#include #include #include #include bool mac_pton(const char *s, u8 *mac) { int i; /* XX:XX:XX:XX:XX:XX */ if (strlen(s) < 3 * ETH_ALEN - 1) return false; /* Don't dirty result unless string is valid MAC. */ for (i = 0; i < ETH_ALEN; i++) { if (!isxdigit(s[i * 3]) || !isxdigit(s[i * 3 + 1])) return false; if (i != ETH_ALEN - 1 && s[i * 3 + 2] != ':') return false; } for (i = 0; i < ETH_ALEN; i++) { mac[i] = (hex_to_bin(s[i * 3]) << 4) | hex_to_bin(s[i * 3 + 1]); } return true; } EXPORT_SYMBOL(mac_pton); ss='logo' rowspan='2'>cgit logo index : net-next.git
net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
path: root/net/sched
AgeCommit message (Expand)AuthorFilesLines
2017-02-03Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-nextDavid S. Miller1-1/+1
2017-02-03sched: cls_flower: expose priority to offloading netdeviceJiri Pirko1-0/+3
2017-02-03net/sched: act_ife: Change to use ife moduleYotam Gigi2-78/+33
2017-02-03net/sched: act_ife: Unexport ife_tlv_meta_encodeYotam Gigi1-2/+2
2017-02-02Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2-85/+48
2017-02-02skbuff: add and use skb_nfct helperFlorian Westphal1-1/+1