/* angst - host.c * by Patroklos Argyroudis * * Linked list manipulation. * * $Id: host.c,v 1.3 2001/02/04 03:37:16 argp Exp $ */ #include "angst.h" void add_host(u_char tp[], u_char sh[], u_char sp[]) { Host *new = NULL; new = (Host *)malloc(sizeof(struct host)); memcpy(new->tpa, tp, 4); memcpy(new->sha, sh, ETHER_ADDR_LEN); memcpy(new->spa, sp, 4); new->prev = NULL; new->next = NULL; if(!head) { head = new; tail = new; } else { tail->next = new; new->prev = tail; tail = new; } return; } /* EOF */