Alexey Dobriyan
4940fc889e
net: add mac_pton() for parsing MAC address
...
mac_pton() parses MAC address in form XX:XX:XX:XX:XX:XX and only in that form.
mac_pton() doesn't dirty result until it's sure string representation is valid.
mac_pton() doesn't care about characters _after_ last octet,
it's up to caller to deal with it.
mac_pton() diverges from 0/-E return value convention.
Target usage:
if (!mac_pton(str, whatever->mac))
return -EINVAL;
/* ->mac being u8 [ETH_ALEN] is filled at this point. */
/* optionally check str[3 * ETH_ALEN - 1] for termination */
Use mac_pton() in pktgen and netconsole for start.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2011-05-09 12:10:49 -07:00
..
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2011-04-17 00:11:25 -07:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2011-04-25 14:34:25 -04:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2011-04-12 14:38:57 -07:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2011-03-22 17:44:12 -07:00
2011-04-07 12:48:45 -07:00
2011-04-07 11:14:49 -07:00
2011-03-31 11:26:23 -03:00
2011-03-22 17:44:15 -07:00
2011-03-31 11:26:23 -03:00
2011-04-07 11:14:49 -07:00
2011-04-07 11:14:49 -07:00
2011-04-07 11:14:49 -07:00
2011-03-18 17:15:11 -07:00
2011-03-31 11:26:23 -03:00
2011-04-07 11:14:49 -07:00
2011-05-05 10:57:45 -07:00
2011-05-03 20:25:42 -07:00
2011-04-07 11:14:49 -07:00
2011-04-17 17:07:57 -07:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2011-04-07 11:14:49 -07:00
2011-04-07 11:14:49 -07:00
2011-04-07 11:14:49 -07:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2011-04-09 13:23:50 -07:00
2011-05-09 12:10:49 -07:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2011-04-11 10:53:11 -07:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2011-03-29 14:48:19 +02:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2011-04-07 12:12:58 -07:00
2011-05-05 10:57:45 -07:00
2011-03-31 11:26:23 -03:00
2011-05-03 20:43:40 -07:00
2011-03-31 11:26:23 -03:00
2011-03-30 00:15:49 +02:00
2011-03-31 11:26:23 -03:00
2011-05-05 13:32:35 -04:00
2011-04-20 01:30:40 -07:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2011-04-07 12:48:45 -07:00
2011-03-31 11:26:23 -03:00
2011-04-07 11:14:49 -07:00
2011-03-31 11:26:23 -03:00
2011-04-07 12:49:17 -07:00
2011-03-28 19:33:04 +02:00
2011-03-31 11:26:23 -03:00
2011-04-07 20:20:24 +00:00
2011-03-31 11:26:23 -03:00