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-05-04 14:08:36 -07:00
2011-03-29 12:11:16 -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-19 11:24:06 -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-26 14:15:06 +00:00
2011-03-31 11:26:23 -03:00
2011-04-26 15:50:29 -04:00
2011-03-31 11:26:23 -03:00
2011-05-05 14:59:02 -07:00
2011-03-31 11:26:23 -03:00
2011-04-25 14:50:08 -04:00
2011-03-30 16:53:38 -07:00
2011-04-05 23:52:43 +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-03-31 11:26:23 -03:00
2011-03-30 17:14:33 -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-04-05 23:51:37 +02:00
2011-05-08 15:42:43 -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-27 23:05:08 -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-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-04 16:20:05 -04:00
2011-05-09 12:10:49 -07:00
2011-05-09 11:41:41 -07:00
2011-03-28 06:05:21 -04:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2011-03-30 00:37:41 +02: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-04-01 16:14:30 +11: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-03-31 11:26:23 -03:00
2011-05-04 12:18:54 -07:00
2011-05-05 11:10:14 -07:00
2011-05-08 15:59:12 -07:00
2011-04-04 17:00:54 +02:00
2011-03-31 11:26:23 -03:00
2011-03-27 17:48:07 +02: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-03-31 11:26:23 -03:00
2011-03-31 08:51:38 +02: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-11 13:44: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-01 07:27:31 -07:00
2011-03-31 11:26:23 -03:00
2011-04-19 15:38:02 -04:00
2011-03-31 11:26:23 -03:00
2011-04-27 23:05:08 -07:00
2011-03-31 11:26:23 -03:00
2011-04-13 17:13:00 -07:00
2011-05-05 11:10:14 -07:00
2011-03-28 06:05:24 -04:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2011-05-03 16:09:40 -07:00
2011-03-31 11:26:23 -03:00
2011-05-05 11:10:14 -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-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2011-03-28 12:53:29 +01:00
2011-03-31 11:26:23 -03:00
2011-04-19 16:49:20 +03:00
2011-03-31 11:26:23 -03:00