• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/zebra/ospfd/

Lines Matching refs:op

105 ospf_packet_free (struct ospf_packet *op)
107 if (op->s)
108 stream_free (op->s);
110 XFREE (MTYPE_OSPF_PACKET, op);
112 op = NULL;
126 ospf_fifo_push (struct ospf_fifo *fifo, struct ospf_packet *op)
129 fifo->tail->next = op;
131 fifo->head = op;
133 fifo->tail = op;
142 struct ospf_packet *op;
144 op = fifo->head;
146 if (op)
148 fifo->head = op->next;
156 return op;
170 struct ospf_packet *op;
173 for (op = fifo->head; op; op = next)
175 next = op->next;
176 ospf_packet_free (op);
192 ospf_packet_add (struct ospf_interface *oi, struct ospf_packet *op)
195 ospf_fifo_push (oi->obuf, op);
204 struct ospf_packet *op;
206 op = ospf_fifo_pop (oi->obuf);
208 if (op)
209 ospf_packet_free (op);
225 ospf_packet_dup (struct ospf_packet *op)
229 new = ospf_packet_new (op->length);
230 ospf_stream_copy (new->s, op->s);
232 new->dst = op->dst;
233 new->length = op->length;
303 ospf_make_md5_digest (struct ospf_interface *oi, struct ospf_packet *op)
313 ibuf = STREAM_DATA (op->s);
339 oldputp = stream_get_putp (op->s);
340 stream_set_putp (op->s, ntohs (ospfh->length));
341 stream_put (op->s, digest, OSPF_AUTH_MD5_SIZE);
342 stream_set_putp (op->s, oldputp);
345 op->length += OSPF_AUTH_MD5_SIZE;
462 struct ospf_packet *op;
482 op = ospf_fifo_head (oi->obuf);
483 assert (op);
484 assert (op->length >= OSPF_HEADER_SIZE);
486 if (op->dst.s_addr == htonl (OSPF_ALLSPFROUTERS) ||
487 op->dst.s_addr == htonl (OSPF_ALLDROUTERS))
491 ospf_make_md5_digest (oi, op);
498 sa_dst.sin_addr = op->dst;
503 if (!IN_MULTICAST (htonl (op->dst.s_addr)))
510 iph.ip_len = iph.ip_hl*4 + op->length;
512 iph.ip_len = htons (iph.ip_hl*4 + op->length);
523 iph.ip_dst.s_addr = op->dst.s_addr;
532 iov[1].iov_base = STREAM_DATA (op->s);
533 iov[1].iov_len = op->length;
541 stream_set_getp (op->s, 1);
542 type = stream_getc (op->s);
550 stream_set_getp (op->s, 0);
551 ospf_packet_dump (op->s);
555 ospf_packet_type_str[type], inet_ntoa (op->dst),
2736 struct ospf_packet *op;
2739 op = ospf_packet_new (oi->ifp->mtu);
2742 ospf_make_header (OSPF_MSG_HELLO, oi, op->s);
2745 length += ospf_make_hello (oi, op->s);
2748 ospf_fill_header (oi, op->s, length);
2751 op->length = length;
2753 op->dst.s_addr = addr->s_addr;
2756 ospf_packet_add (oi, op);
2835 struct ospf_packet *op;
2842 op = ospf_packet_new (oi->ifp->mtu);
2845 ospf_make_header (OSPF_MSG_HELLO, oi, op->s);
2848 length += ospf_make_hello (oi, op->s);
2851 ospf_fill_header (oi, op->s, length);
2854 op->length = length;
2888 op_dup = ospf_packet_dup(op);
2898 ospf_packet_free (op);
2904 op->dst.s_addr = oi->vl_data->peer_addr.s_addr;
2906 op->dst.s_addr = htonl (OSPF_ALLSPFROUTERS);
2909 ospf_packet_add (oi, op);
2921 struct ospf_packet *op;
2925 op = ospf_packet_new (oi->ifp->mtu);
2928 ospf_make_header (OSPF_MSG_DB_DESC, oi, op->s);
2931 length += ospf_make_db_desc (oi, nbr, op->s);
2934 ospf_fill_header (oi, op->s, length);
2937 op->length = length;
2940 op->dst = nbr->address.u.prefix4;
2943 ospf_packet_add (oi, op);
2951 nbr->last_send = ospf_packet_dup (op);
2975 struct ospf_packet *op;
2979 op = ospf_packet_new (oi->ifp->mtu);
2982 ospf_make_header (OSPF_MSG_LS_REQ, oi, op->s);
2985 length += ospf_make_ls_req (nbr, op->s);
2988 ospf_packet_free (op);
2993 ospf_fill_header (oi, op->s, length);
2996 op->length = length;
2999 op->dst = nbr->address.u.prefix4;
3002 ospf_packet_add (oi, op);
3030 struct ospf_packet *op;
3036 op = ospf_packet_new (oi->ifp->mtu);
3039 ospf_make_header (OSPF_MSG_LS_UPD, oi, op->s);
3043 length += ospf_make_ls_upd (oi, update, op->s);
3046 ospf_fill_header (oi, op->s, length);
3049 op->length = length;
3052 op->dst.s_addr = addr.s_addr;
3055 ospf_packet_add (oi, op);
3141 struct ospf_packet *op;
3144 op = ospf_packet_new (oi->ifp->mtu);
3147 ospf_make_header (OSPF_MSG_LS_ACK, oi, op->s);
3150 length += ospf_make_ls_ack (oi, ack, op->s);
3153 ospf_fill_header (oi, op->s, length);
3156 op->length = length;
3159 op->dst = dst;
3162 ospf_packet_add (oi, op);