MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ndp_ether_aton

Function ndp_ether_aton

tools/ndp/ndp.c:890–904  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

888}
889
890static int
891ndp_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
906static void
907usage()

Callers 1

setFunction · 0.85

Calls 1

sscanfFunction · 0.85

Tested by

no test coverage detected