ifa=(struct ospf_iface *)(sk->data);
p=(struct proto *)(ifa->proto);
- DBG(p->name);
- DBG(": TX_Hook called on interface ");
- DBG(sk->iface->name);
- DBG(".\n");
+ DBG("%s: TX_Hook called on interface %s\n", p->name,sk->iface->name);
}
void
ifa=(struct ospf_iface *)(sk->data);
p=(struct proto *)(ifa->proto);
- DBG(p->name);
- DBG(": Err_Hook called on interface ");
- DBG(sk->iface->name);
- DBG(".\n");
+ DBG("%s: Err_Hook called on interface %s\n", p->name,sk->iface->name);
}
/* This will change ! */
pkt->routerid=htonl(p->cf->global->router_id);
pkt->areaid=htonl(ifa->area);
pkt->autype=htons(ifa->autype);
+ pkt->checksum=0;
}
void
op->length=ntohs(length);
- /* Do authentification */
+ /* FIXME Do authentification */
+ /* Count checksum */
op->checksum=ipsum_calculate(op,sizeof(struct ospf_packet)-8,
&(pkt->netmask),length-sizeof(struct ospf_packet),NULL);