nd_uint16_t len;
nd_uint8_t type; /* No padding after this; afi is, in fact, not aligned */
nd_uint16_t afi;
- nd_uint8_t res;
+ nd_uint8_t subtype;
nd_uint8_t safi;
};
#define BGP_ROUTE_REFRESH_SIZE 23
+#define BGP_ROUTE_REFRESH_SUBTYPE_NORMAL 0
+#define BGP_ROUTE_REFRESH_SUBTYPE_BORR 1
+#define BGP_ROUTE_REFRESH_SUBTYPE_EORR 2
+#define BGP_ROUTE_REFRESH_SUBTYPE_RESERVED 255
+
+static const struct tok bgp_route_refresh_subtype_values[] = {
+ {BGP_ROUTE_REFRESH_SUBTYPE_NORMAL, "Normal route refresh request"},
+ {BGP_ROUTE_REFRESH_SUBTYPE_BORR,
+ "Demarcation of the beginning of a route refresh"},
+ {BGP_ROUTE_REFRESH_SUBTYPE_EORR,
+ "Demarcation of the ending of a route refresh"},
+ {0, NULL}};
#define bgp_attr_lenlen(flags, p) \
(((flags) & 0x10) ? 2U : 1U)
bgp_route_refresh_header = (const struct bgp_route_refresh *)pptr;
- ND_PRINT("\n\t AFI %s (%u), SAFI %s (%u)",
- tok2str(af_values,"Unknown",
- GET_BE_U_2(bgp_route_refresh_header->afi)),
- GET_BE_U_2(bgp_route_refresh_header->afi),
- tok2str(bgp_safi_values,"Unknown",
- GET_U_1(bgp_route_refresh_header->safi)),
- GET_U_1(bgp_route_refresh_header->safi));
+ ND_PRINT("\n\t AFI %s (%u), SAFI %s (%u), Subtype %s (%u)",
+ tok2str(af_values, "Unknown",
+ GET_BE_U_2(bgp_route_refresh_header->afi)),
+ GET_BE_U_2(bgp_route_refresh_header->afi),
+ tok2str(bgp_safi_values, "Unknown",
+ GET_U_1(bgp_route_refresh_header->safi)),
+ GET_U_1(bgp_route_refresh_header->safi),
+ tok2str(bgp_route_refresh_subtype_values, "Unknown",
+ GET_U_1(bgp_route_refresh_header->subtype)),
+ GET_U_1(bgp_route_refresh_header->subtype));
if (ndo->ndo_vflag > 1) {
ND_TCHECK_LEN(pptr, len);
--- /dev/null
+ 1 11:21:59.145495 IP6 (class 0xc0, flowlabel 0x8b071, hlim 1, next-header TCP (6) payload length: 55) 2a02:abc::17.37754 > 2a02:abc::123.179: Flags [P.], cksum 0x6af3 (incorrect -> 0xd8aa), seq 3973869487:3973869510, ack 742445183, win 501, options [nop,nop,TS val 1477990677 ecr 1816731457], length 23: BGP
+ Route Refresh Message (5), length: 23
+ AFI IPv4 (1), SAFI Unicast (1), Subtype Normal route refresh request (0)
+ 2 11:21:59.146152 IP6 (class 0xc0, flowlabel 0xb2582, hlim 1, next-header TCP (6) payload length: 55) 2a02:abc::123.179 > 2a02:abc::17.37754: Flags [P.], cksum 0xcbcd (correct), seq 1:24, ack 23, win 501, options [nop,nop,TS val 1816734726 ecr 1477990677], length 23: BGP
+ Route Refresh Message (5), length: 23
+ AFI IPv4 (1), SAFI Unicast (1), Subtype Demarcation of the beginning of a route refresh (1)
+ 3 11:21:59.692052 IP6 (class 0xc0, flowlabel 0xb2582, hlim 1, next-header TCP (6) payload length: 360) 2a02:abc::123.179 > 2a02:abc::17.37754: Flags [P.], cksum 0x57e1 (correct), seq 24:352, ack 176, win 501, options [nop,nop,TS val 1816735270 ecr 1477990778], length 328: BGP
+ Update Message (2), length: 79
+ Origin (1), length: 1, Flags [T]: Incomplete
+ AS Path (2), length: 10, Flags [TE]: 174 65001
+ Next Hop (3), length: 4, Flags [T]: 192.168.10.123
+ Updated routes:
+ 10.0.0.0/24
+ 192.168.3.0/24
+ 192.168.2.0/24
+ 192.168.1.0/24
+ 172.16.16.3/32
+ 172.16.16.2/32
+ 172.16.16.1/32
+ Update Message (2), length: 55
+ Origin (1), length: 1, Flags [T]: Incomplete
+ AS Path (2), length: 6, Flags [TE]: 174
+ Next Hop (3), length: 4, Flags [T]: 192.168.10.123
+ Multi Exit Discriminator (4), length: 4, Flags [O]: 0
+ Updated routes:
+ 10.0.2.0/24
+ Update Message (2), length: 55
+ Origin (1), length: 1, Flags [T]: Incomplete
+ AS Path (2), length: 6, Flags [TE]: 174
+ Next Hop (3), length: 4, Flags [T]: 192.168.10.123
+ Multi Exit Discriminator (4), length: 4, Flags [O]: 0
+ Updated routes:
+ 192.168.0.0/24
+ Update Message (2), length: 55
+ Origin (1), length: 1, Flags [T]: Incomplete
+ AS Path (2), length: 6, Flags [TE]: 174
+ Next Hop (3), length: 4, Flags [T]: 192.168.10.123
+ Multi Exit Discriminator (4), length: 4, Flags [O]: 0
+ Updated routes:
+ 192.168.10.0/24
+ Update Message (2), length: 61
+ Origin (1), length: 1, Flags [T]: Incomplete
+ AS Path (2), length: 6, Flags [TE]: 174
+ Next Hop (3), length: 4, Flags [T]: 192.168.10.123
+ Multi Exit Discriminator (4), length: 4, Flags [O]: 0
+ Updated routes:
+ 192.168.100.1/32
+ 192.168.100.2/32
+ Route Refresh Message (5), length: 23
+ AFI IPv4 (1), SAFI Unicast (1), Subtype Demarcation of the ending of a route refresh (2)