Add PPPOE-SERVER functionality

This commit is contained in:
fendo 2013-01-08 10:50:57 +01:00
parent ddffeb1ceb
commit 11996ba414
15 changed files with 1403 additions and 57 deletions

11
util.c
View file

@ -28,6 +28,17 @@ char *fmtaddr(in_addr_t addr, int n)
return strcpy(addrs[n], inet_ntoa(in));
}
char *fmtMacAddr(uint8_t *pMacAddr)
{
static char strMAC[2*ETH_ALEN];
sprintf(strMAC, "%02X:%02X:%02X:%02X:%02X:%02X",
pMacAddr[0], pMacAddr[1], pMacAddr[2],
pMacAddr[3], pMacAddr[4], pMacAddr[5]);
return strMAC;
}
void *shared_malloc(unsigned int size)
{
void * p;