| 888 | } |
| 889 | |
| 890 | static int |
| 891 | ndp_ether_aton(char *a, u_char *n) |
| 892 | { |
| 893 | int i, o[6]; |
| 894 | |
| 895 | i = sscanf(a, "%x:%x:%x:%x:%x:%x", &o[0], &o[1], &o[2], |
| 896 | &o[3], &o[4], &o[5]); |
| 897 | if (i != 6) { |
| 898 | fprintf(stderr, "ndp: invalid Ethernet address '%s'\n", a); |
| 899 | return (1); |
| 900 | } |
| 901 | for (i = 0; i < 6; i++) |
| 902 | n[i] = o[i]; |
| 903 | return (0); |
| 904 | } |
| 905 | |
| 906 | static void |
| 907 | usage() |