void
ospf_lsack_enqueue(struct ospf_neighbor *n, struct ospf_lsa_header *h,
- struct proto *p, int queue)
+ int queue)
{
- struct lsah_n *no;
-
- no = mb_alloc(n->pool, sizeof(struct lsah_n));
+ struct lsah_n *no = mb_alloc(n->pool, sizeof(struct lsah_n));
memcpy(&no->lsa, h, sizeof(struct ospf_lsa_header));
add_tail(&n->ackl[queue], NODE no);
DBG("Adding (%s) ack for %I, ID: %I, RT: %I, Type: %u\n", s_queue[queue],
}
void
-ospf_lsack_receive(struct ospf_lsack_packet *ps, struct proto *p,
+ospf_lsack_receive(struct ospf_lsack_packet *ps,
struct ospf_iface *ifa, u16 size)
{
u32 nrid, myrid;
u16 nolsa, i;
struct top_hash_entry *en;
u16 lenn = ntohs(ps->ospf_packet.length);
+ struct proto *p = (struct proto *) ifa->proto;
nrid = ntohl(ps->ospf_packet.routerid);
struct ospf_lsa_header lsa;
};
-void ospf_lsack_receive(struct ospf_lsack_packet *ps, struct proto *p,
+void ospf_lsack_receive(struct ospf_lsack_packet *ps,
struct ospf_iface *ifa, u16 size);
void ospf_lsack_send(struct ospf_neighbor *n, int queue);
void ospf_lsack_enqueue(struct ospf_neighbor *n, struct ospf_lsa_header *h,
- struct proto *p, int queue);
+ int queue);
#endif /* _BIRD_OSPF_LSACK_H_ */
/* pg 143 (4) */
if((lsatmp.age==LSA_MAXAGE)&&(lsadb==NULL)&&can_flush_lsa(oa))
{
- ospf_lsack_enqueue(n, lsa, p, ACKL_DIRECT);
+ ospf_lsack_enqueue(n, lsa, ACKL_DIRECT);
continue;
}
if((lsatmp.age==LSA_MAXAGE)&&(lsatmp.sn==LSA_MAXSEQNO))
{
- ospf_lsack_enqueue(n, lsa, p, ACKL_DIRECT);
+ ospf_lsack_enqueue(n, lsa, ACKL_DIRECT);
continue;
}
DBG("Wasn't flooded back\n"); /* ps 144(5e), pg 153 */
if(ifa->state==OSPF_IS_BACKUP)
{
- if(ifa->drid==n->rid) ospf_lsack_enqueue(n, lsa, p, ACKL_DELAY);
+ if(ifa->drid==n->rid) ospf_lsack_enqueue(n, lsa, ACKL_DELAY);
}
- else ospf_lsack_enqueue(n, lsa, p, ACKL_DELAY);
+ else ospf_lsack_enqueue(n, lsa, ACKL_DELAY);
}
/* Remove old from all ret lists */
ospf_hash_delete(n->lsrth, en);
if(ifa->state==OSPF_IS_BACKUP)
{
- if(n->rid==ifa->drid) ospf_lsack_enqueue(n, lsa, p, ACKL_DELAY);
+ if(n->rid==ifa->drid) ospf_lsack_enqueue(n, lsa, ACKL_DELAY);
}
}
else
{
/* pg145 (7b) */
- ospf_lsack_enqueue(n, lsa, p, ACKL_DIRECT);
+ ospf_lsack_enqueue(n, lsa, ACKL_DIRECT);
}
continue;
}
break;
case LSACK_P:
DBG ("%s: Link state ack received.\n", p->name);
- ospf_lsack_receive((struct ospf_lsack_packet *) ps, p, ifa, size);
+ ospf_lsack_receive((struct ospf_lsack_packet *) ps, ifa, size);
break;
default:
log ("%s: Bad packet received: wrong type %u", p->name, ps->type);