rip_hdr
pos = sizeof(struct rip_hdr) + sizeof(struct rip_auth) +
rip_hdr = (struct rip_hdr *)buf;
if (rip_hdr_sanity_check(rip_hdr) == -1)
switch (rip_hdr->command) {
rip_hdr_sanity_check(struct rip_hdr *rip_hdr)
if (rip_hdr->version != RIP_VERSION) {
rip_hdr->version);
int rip_hdr_sanity_check(struct rip_hdr *);
struct rip_hdr rip_hdr;
bzero(&rip_hdr, sizeof(rip_hdr));
rip_hdr.version = RIP_VERSION;
rip_hdr.command = command;
return (ibuf_add(buf, &rip_hdr, sizeof(rip_hdr)));
struct rip_hdr *rip_hdr;
#define RIP_HDR_LEN sizeof(struct rip_hdr)