henesyinit from p9fce6d0435 years agoHistory
25 lines · 332 B · Text
RawDownload
#include <alef.h>#include <bio.h>#include <net.h> intparseether(byte *to, byte *from){	int i;	byte nip[4], *p; 	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] = strtoui(nip, nil, 16);		if(*p == ':')			p++;	}	return 0;}