/** * ospf_send_dbdes - transmit database description packet * @p: OSPF protocol instance * @n: neighbor * * Sending of a database description packet is described in 10.8 of RFC 2328. * Reception of each packet is acknowledged in the sequence number of another. * When I send a packet to a neighbor I keep a copy in a buffer. If the neighbor * does not reply, I don't create a new packet but just send the content * of the buffer. */ void ospf_send_dbdes(struct ospf_proto *p, struct ospf_neighbor *n) { /* RFC 2328 10.8 */ ASSERT((n->state == NEIGHBOR_EXSTART) || (n->state == NEIGHBOR_EXCHANGE)); if (n->ifa->oa->rt == NULL) return; ospf_prepare_dbdes(p, n); ospf_do_send_dbdes(p, n); }
void ospf_rxmt_dbdes(struct ospf_proto *p, struct ospf_neighbor *n) { ASSERT(n->state > NEIGHBOR_EXSTART); if (!n->ldd_buffer) { log(L_WARN "%s: No DBDES packet for retransmit", p->p.name); ospf_neigh_sm(n, INM_SEQMIS); return; } /* Send last packet */ ospf_do_send_dbdes(p, n); }