Lines Matching defs:pdu
398 * It's ugly. We need a function to pass all tlvs and create pdu but since I
424 #define BASIC_HELLO_MSG_SIZE (sizeof(struct ldp_pdu) + /* PDU */ \
444 /* Prepare PDU envelope */
540 " (PDU: %d, Hello TLV: %d, CH: %d, TR: %d)\n",
608 "(PDU: %d, Hello TLV: %d, CH: %d TR: %d)\n",
685 /* Read the PDU */
688 debugp("recv_pdu(%d): PDU(size: %d) from: %s\n", sock,
701 fatalp("Received our PDU. Ignoring it\n");
1128 debugp("Incoming PDU size exceeds MAX_PDU_SIZE !\n");
1132 debugp("PDU too small received from peer %s\n",
1146 debugp("Read %d bytes, PDU size: %d bytes\n", c, ntohs(rpdu->length));
1339 /* Sends a pdu, tlv pair to a connected peer */
1341 send_message(const struct ldp_peer * p, const struct ldp_pdu * pdu,
1356 if (ntohs(pdu->length) !=
1358 fatalp("LDP: TLV - PDU incompability. Message discarded\n");
1359 fatalp("LDP: TLV len %d - PDU len %d\n", ntohs(t->length),
1360 ntohs(pdu->length));
1368 memcpy(sendspace, pdu, sizeof(struct ldp_pdu));
1383 ntohs(pdu->length) + PDU_VER_LENGTH, 0);
1387 * Encapsulates TLV into a PDU and sends it to a peer
1393 struct ldp_pdu pdu;
1397 pdu.version = htons(LDP_VERSION);
1398 pdu.ldp_id = ldp_id;
1399 pdu.label_space = 0;
1400 pdu.length = htons(ntohs(t->length) + TLV_TYPE_LENGTH +
1403 return send_message(p, &pdu, t);