babel_print(netdissect_options *ndo,
const u_char *cp, u_int length)
{
babel_print(netdissect_options *ndo,
const u_char *cp, u_int length)
{
-#define MESSAGE_UPDATE_SRC_SPECIFIC 13
-#define MESSAGE_REQUEST_SRC_SPECIFIC 14
-#define MESSAGE_MH_REQUEST_SRC_SPECIFIC 15
+#define MESSAGE_UPDATE_SRC_SPECIFIC 13 /* last appearance in draft-boutier-babel-source-specific-01 */
+#define MESSAGE_REQUEST_SRC_SPECIFIC 14 /* idem */
+#define MESSAGE_MH_REQUEST_SRC_SPECIFIC 15 /* idem */
* o Type 1 stands for PadN sub-TLV with the same encoding as the PadN TLV.
* o Type 2 stands for Diversity sub-TLV, which propagates diversity routing
* data. Its body is a variable-length sequence of 8-bit unsigned integers,
* o Type 1 stands for PadN sub-TLV with the same encoding as the PadN TLV.
* o Type 2 stands for Diversity sub-TLV, which propagates diversity routing
* data. Its body is a variable-length sequence of 8-bit unsigned integers,
* prefix. Channel 0 is invalid and must not be used in the sub-TLV, channel
* 255 interferes with any other channel.
* o Type 3 stands for Timestamp sub-TLV, used to compute RTT between
* prefix. Channel 0 is invalid and must not be used in the sub-TLV, channel
* 255 interferes with any other channel.
* o Type 3 stands for Timestamp sub-TLV, used to compute RTT between
interval = EXTRACT_BE_U_2(message + 6);
ae = EXTRACT_U_1(message + 2);
rc = network_address(ae, message + 8,
len - 6, address);
interval = EXTRACT_BE_U_2(message + 6);
ae = EXTRACT_U_1(message + 2);
rc = network_address(ae, message + 8,
len - 6, address);
- if(rc < 0) { ND_PRINT("%s", tstr); break; }
- ND_PRINT("%s txcost %u interval %s",
+ if(rc < 0) { nd_print_trunc(ndo); break; }
+ ND_PRINT("%s rxcost %u interval %s",
/* Extra data. */
if((u_int)rc < len - 6)
subtlvs_print(ndo, message + 8 + rc, message + 2 + len,
/* Extra data. */
if((u_int)rc < len - 6)
subtlvs_print(ndo, message + 8 + rc, message + 2 + len,
if(len < 2) goto invalid;
ae = EXTRACT_U_1(message + 2);
plen = EXTRACT_U_1(message + 3) + (EXTRACT_U_1(message + 2) == 1 ? 96 : 0);
if(len < 2) goto invalid;
ae = EXTRACT_U_1(message + 2);
plen = EXTRACT_U_1(message + 3) + (EXTRACT_U_1(message + 2) == 1 ? 96 : 0);
if(len < 14) goto invalid;
ae = EXTRACT_U_1(message + 2);
seqno = EXTRACT_BE_U_2(message + 4);
if(len < 14) goto invalid;
ae = EXTRACT_U_1(message + 2);
seqno = EXTRACT_BE_U_2(message + 4);