diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2017-12-09 22:07:32 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2017-12-09 22:07:32 +0100 |
commit | 35bc3ac5735bd0edff45b68465de710ff61d2385 (patch) | |
tree | b331ab7c7a7a0d7f936a9902c7bea13e12b38c19 | |
parent | a7ac020664f1de870b09807086565030246ad6fb (diff) | |
download | plan9front-35bc3ac5735bd0edff45b68465de710ff61d2385.tar.xz |
devether: remove duplicated parseether() implementation (pull from libip)
-rw-r--r-- | sys/src/9/ip/ip.h | 2 | ||||
-rw-r--r-- | sys/src/9/kw/devether.c | 23 | ||||
-rw-r--r-- | sys/src/9/mtx/devether.c | 23 | ||||
-rw-r--r-- | sys/src/9/omap/devether.c | 23 | ||||
-rw-r--r-- | sys/src/9/pc/devether.c | 23 | ||||
-rw-r--r-- | sys/src/9/ppc/devether.c | 23 | ||||
-rw-r--r-- | sys/src/9/sgi/devether.c | 23 | ||||
-rw-r--r-- | sys/src/9/teg2/devether.c | 23 | ||||
-rw-r--r-- | sys/src/9/zynq/devether.c | 23 |
9 files changed, 1 insertions, 185 deletions
diff --git a/sys/src/9/ip/ip.h b/sys/src/9/ip/ip.h index 8d9a09f1d..73c6a836c 100644 --- a/sys/src/9/ip/ip.h +++ b/sys/src/9/ip/ip.h @@ -644,7 +644,7 @@ extern void arpenter(Fs*, int version, uchar *ip, uchar *mac, int len, int noref * ipaux.c */ -extern int myetheraddr(uchar*, char*); +extern int parseether(uchar*, char*); extern vlong parseip(uchar*, char*); extern vlong parseipmask(uchar*, char*); extern char* v4parseip(uchar*, char*); diff --git a/sys/src/9/kw/devether.c b/sys/src/9/kw/devether.c index df59c22b1..ef1f2708f 100644 --- a/sys/src/9/kw/devether.c +++ b/sys/src/9/kw/devether.c @@ -336,29 +336,6 @@ addethercard(char* t, int (*r)(Ether*)) ncard++; } -int -parseether(uchar *to, char *from) -{ - char nip[4]; - char *p; - int i; - - p = from; - for(i = 0; i < Eaddrlen; i++){ - if(*p == 0) - return -1; - nip[0] = *p++; - if(*p == 0) - return -1; - nip[1] = *p++; - nip[2] = 0; - to[i] = strtoul(nip, 0, 16); - if(*p == ':') - p++; - } - return 0; -} - static void etherreset(void) { diff --git a/sys/src/9/mtx/devether.c b/sys/src/9/mtx/devether.c index 51c63857d..657b22ccf 100644 --- a/sys/src/9/mtx/devether.c +++ b/sys/src/9/mtx/devether.c @@ -321,29 +321,6 @@ addethercard(char* t, int (*r)(Ether*)) ncard++; } -int -parseether(uchar *to, char *from) -{ - char nip[4]; - char *p; - int i; - - p = from; - for(i = 0; i < 6; i++){ - if(*p == 0) - return -1; - nip[0] = *p++; - if(*p == 0) - return -1; - nip[1] = *p++; - nip[2] = 0; - to[i] = strtoul(nip, 0, 16); - if(*p == ':') - p++; - } - return 0; -} - static void etherreset(void) { diff --git a/sys/src/9/omap/devether.c b/sys/src/9/omap/devether.c index de03504d9..152be7ef6 100644 --- a/sys/src/9/omap/devether.c +++ b/sys/src/9/omap/devether.c @@ -334,29 +334,6 @@ addethercard(char* t, int (*r)(Ether*)) ncard++; } -int -parseether(uchar *to, char *from) -{ - char nip[4]; - char *p; - int i; - - p = from; - for(i = 0; i < Eaddrlen; i++){ - if(*p == 0) - return -1; - nip[0] = *p++; - if(*p == 0) - return -1; - nip[1] = *p++; - nip[2] = 0; - to[i] = strtoul(nip, 0, 16); - if(*p == ':') - p++; - } - return 0; -} - static void etherreset(void) { diff --git a/sys/src/9/pc/devether.c b/sys/src/9/pc/devether.c index b580fe8c1..16d9d9e5a 100644 --- a/sys/src/9/pc/devether.c +++ b/sys/src/9/pc/devether.c @@ -341,29 +341,6 @@ addethercard(char* t, int (*r)(Ether*)) ncard++; } -int -parseether(uchar *to, char *from) -{ - char nip[4]; - char *p; - int i; - - p = from; - for(i = 0; i < Eaddrlen; i++){ - if(*p == 0) - return -1; - nip[0] = *p++; - if(*p == 0) - return -1; - nip[1] = *p++; - nip[2] = 0; - to[i] = strtoul(nip, 0, 16); - if(*p == ':') - p++; - } - return 0; -} - static Ether* etherprobe(int cardno, int ctlrno) { diff --git a/sys/src/9/ppc/devether.c b/sys/src/9/ppc/devether.c index 112a581b4..5e1179b43 100644 --- a/sys/src/9/ppc/devether.c +++ b/sys/src/9/ppc/devether.c @@ -320,29 +320,6 @@ addethercard(char* t, int (*r)(Ether*)) ncard++; } -int -parseether(uchar *to, char *from) -{ - char nip[4]; - char *p; - int i; - - p = from; - for(i = 0; i < 6; i++){ - if(*p == 0) - return -1; - nip[0] = *p++; - if(*p == 0) - return -1; - nip[1] = *p++; - nip[2] = 0; - to[i] = strtoul(nip, 0, 16); - if(*p == ':') - p++; - } - return 0; -} - static void etherreset(void) { diff --git a/sys/src/9/sgi/devether.c b/sys/src/9/sgi/devether.c index 0902953cf..6339b99ef 100644 --- a/sys/src/9/sgi/devether.c +++ b/sys/src/9/sgi/devether.c @@ -340,29 +340,6 @@ addethercard(char* t, int (*r)(Ether*)) ncard++; } -int -parseether(uchar *to, char *from) -{ - char nip[4]; - char *p; - int i; - - p = from; - for(i = 0; i < Eaddrlen; i++){ - if(*p == 0) - return -1; - nip[0] = *p++; - if(*p == 0) - return -1; - nip[1] = *p++; - nip[2] = 0; - to[i] = strtoul(nip, 0, 16); - if(*p == ':') - p++; - } - return 0; -} - static Ether* etherprobe(int cardno, int ctlrno) { diff --git a/sys/src/9/teg2/devether.c b/sys/src/9/teg2/devether.c index eb0ae1b21..6a52d6b56 100644 --- a/sys/src/9/teg2/devether.c +++ b/sys/src/9/teg2/devether.c @@ -332,29 +332,6 @@ addethercard(char* t, int (*r)(Ether*)) ncard++; } -int -parseether(uchar *to, char *from) -{ - char nip[4]; - char *p; - int i; - - p = from; - for(i = 0; i < Eaddrlen; i++){ - if(*p == 0) - return -1; - nip[0] = *p++; - if(*p == 0) - return -1; - nip[1] = *p++; - nip[2] = 0; - to[i] = strtoul(nip, 0, 16); - if(*p == ':') - p++; - } - return 0; -} - static void etherreset(void) { diff --git a/sys/src/9/zynq/devether.c b/sys/src/9/zynq/devether.c index 90777e6f5..d3b6e9b64 100644 --- a/sys/src/9/zynq/devether.c +++ b/sys/src/9/zynq/devether.c @@ -340,29 +340,6 @@ addethercard(char* t, int (*r)(Ether*)) ncard++; } -int -parseether(uchar *to, char *from) -{ - char nip[4]; - char *p; - int i; - - p = from; - for(i = 0; i < Eaddrlen; i++){ - if(*p == 0) - return -1; - nip[0] = *p++; - if(*p == 0) - return -1; - nip[1] = *p++; - nip[2] = 0; - to[i] = strtoul(nip, 0, 16); - if(*p == ':') - p++; - } - return 0; -} - static Ether* etherprobe(int cardno, int ctlrno) { |