The function body should have its opening brace on the next line.
};
static int
-ahcp_time_print(netdissect_options *ndo, const u_char *cp, const u_char *ep) {
+ahcp_time_print(netdissect_options *ndo, const u_char *cp, const u_char *ep)
+{
time_t t;
struct tm *tm;
char buf[BUFSIZE];
}
static int
-ahcp_seconds_print(netdissect_options *ndo, const u_char *cp, const u_char *ep) {
+ahcp_seconds_print(netdissect_options *ndo, const u_char *cp, const u_char *ep)
+{
if (cp + 4 != ep)
goto corrupt;
ND_TCHECK2(*cp, 4);
}
static int
-ahcp_ipv6_addresses_print(netdissect_options *ndo, const u_char *cp, const u_char *ep) {
+ahcp_ipv6_addresses_print(netdissect_options *ndo, const u_char *cp, const u_char *ep)
+{
const char *sep = ": ";
while (cp < ep) {
}
static int
-ahcp_ipv4_addresses_print(netdissect_options *ndo, const u_char *cp, const u_char *ep) {
+ahcp_ipv4_addresses_print(netdissect_options *ndo, const u_char *cp, const u_char *ep)
+{
const char *sep = ": ";
while (cp < ep) {
}
static int
-ahcp_ipv6_prefixes_print(netdissect_options *ndo, const u_char *cp, const u_char *ep) {
+ahcp_ipv6_prefixes_print(netdissect_options *ndo, const u_char *cp, const u_char *ep)
+{
const char *sep = ": ";
while (cp < ep) {
}
static int
-ahcp_ipv4_prefixes_print(netdissect_options *ndo, const u_char *cp, const u_char *ep) {
+ahcp_ipv4_prefixes_print(netdissect_options *ndo, const u_char *cp, const u_char *ep)
+{
const char *sep = ": ";
while (cp < ep) {
};
static void
-ahcp1_options_print(netdissect_options *ndo, const u_char *cp, const u_char *ep) {
+ahcp1_options_print(netdissect_options *ndo, const u_char *cp, const u_char *ep)
+{
uint8_t option_no, option_len;
while (cp < ep) {
}
static void
-ahcp1_body_print(netdissect_options *ndo, const u_char *cp, const u_char *ep) {
+ahcp1_body_print(netdissect_options *ndo, const u_char *cp, const u_char *ep)
+{
uint8_t type, mbz;
uint16_t body_len;
}
void
-ahcp_print(netdissect_options *ndo, const u_char *cp, const u_int len) {
+ahcp_print(netdissect_options *ndo, const u_char *cp, const u_int len)
+{
const u_char *ep = cp + len;
uint8_t version;
trunc:
ND_PRINT((ndo, "%s", tstr));
}
-
int
oam_print (netdissect_options *ndo,
- const u_char *p, u_int length, u_int hec) {
-
+ const u_char *p, u_int length, u_int hec)
+{
uint32_t cell_header;
uint16_t vpi, vci, cksum, cksum_shouldbe, idx;
uint8_t cell_type, func_type, payload, clp;
void
babel_print(netdissect_options *ndo,
- const u_char *cp, u_int length) {
+ const u_char *cp, u_int length)
+{
ND_PRINT((ndo, "babel"));
ND_TCHECK2(*cp, 4);
*/
static void
subtlvs_print(netdissect_options *ndo,
- const u_char *cp, const u_char *ep, const uint8_t tlv_type) {
+ const u_char *cp, const u_char *ep, const uint8_t tlv_type)
+{
uint8_t subtype, sublen;
const char *sep;
uint32_t t1, t2;
static void
babel_print_v2(netdissect_options *ndo,
- const u_char *cp, u_int length) {
+ const u_char *cp, u_int length)
+{
u_int i;
u_short bodylen;
u_char v4_prefix[16] =
*/
static char *
bgp_vpn_ip_print(netdissect_options *ndo,
- const u_char *pptr, u_int addr_length) {
+ const u_char *pptr, u_int addr_length)
+{
/* worst case string is s fully formatted v6 address */
static char addr[sizeof("1234:5678:89ab:cdef:1234:5678:89ab:cdef")];
*/
static int
bgp_vpn_sg_print(netdissect_options *ndo,
- const u_char *pptr, char *buf, u_int buflen) {
-
+ const u_char *pptr, char *buf, u_int buflen)
+{
uint8_t addr_length;
u_int total_length, offset;
* printing route targets inside a NLRI */
char *
bgp_vpn_rd_print(netdissect_options *ndo,
- const u_char *pptr) {
-
+ const u_char *pptr)
+{
/* allocate space for the largest possible string */
static char rd[sizeof("xxxxxxxxxx:xxxxx (xxx.xxx.xxx.xxx:xxxxx)")];
char *pos = rd;
static void
bgp_route_refresh_print(netdissect_options *ndo,
- const u_char *pptr, int len) {
-
+ const u_char *pptr, int len)
+{
const struct bgp_route_refresh *bgp_route_refresh_header;
char tokbuf[TOKBUFSIZE];
char tokbuf2[TOKBUFSIZE];
static int
cfm_mgmt_addr_print(netdissect_options *ndo,
- register const u_char *tptr) {
-
+ register const u_char *tptr)
+{
u_int mgmt_addr_type;
u_int hexdump = FALSE;
* The egress-ID string is a 16-Bit string plus a MAC address.
*/
static const char *
-cfm_egress_id_string(netdissect_options *ndo, register const u_char *tptr) {
+cfm_egress_id_string(netdissect_options *ndo, register const u_char *tptr)
+{
static char egress_id_buffer[80];
snprintf(egress_id_buffer, sizeof(egress_id_buffer),
void
cfm_print(netdissect_options *ndo,
- register const u_char *pptr, register u_int length) {
-
+ register const u_char *pptr, register u_int length)
+{
const struct cfm_common_header_t *cfm_common_header;
const struct cfm_tlv_header_t *cfm_tlv_header;
const uint8_t *tptr, *tlv_ptr, *ma_name, *ma_nameformat, *ma_namelength;
}
u_int
-chdlc_print(netdissect_options *ndo, register const u_char *p, u_int length) {
+chdlc_print(netdissect_options *ndo, register const u_char *p, u_int length)
+{
u_int proto;
proto = EXTRACT_16BITS(&p[2]);
};
void
-eigrp_print(netdissect_options *ndo, register const u_char *pptr, register u_int len) {
-
+eigrp_print(netdissect_options *ndo, register const u_char *pptr, register u_int len)
+{
const struct eigrp_common_header *eigrp_com_header;
const struct eigrp_tlv_header *eigrp_tlv_header;
const u_char *tptr,*tlv_tptr;
return 1;
}
-char *q922_string(netdissect_options *ndo, const u_char *p, u_int length) {
+char *
+q922_string(netdissect_options *ndo, const u_char *p, u_int length)
+{
static u_int dlci, addr_len;
static uint8_t flags[4];
static void
frf15_print(netdissect_options *ndo,
- const u_char *p, u_int length) {
-
+ const u_char *p, u_int length)
+{
uint16_t sequence_num, flags;
flags = p[0]&MFR_BEC_MASK;
/* print the milliseconds since midnight UTC */
const char *
-icmp_tstamp_print(u_int tstamp) {
+icmp_tstamp_print(u_int tstamp)
+{
u_int msec,sec,min,hrs;
static char buf[64];
static int
isis_print_ip_reach_subtlv(netdissect_options *ndo,
const uint8_t *tptr, int subt, int subl,
- const char *ident) {
-
+ const char *ident)
+{
/* first lets see if we know the subTLVs name*/
ND_PRINT((ndo, "%s%s subTLV #%u, length: %u",
ident, tok2str(isis_ext_ip_reach_subtlv_values, "unknown", subt),
static int
isis_print_is_reach_subtlv(netdissect_options *ndo,
const uint8_t *tptr, u_int subt, u_int subl,
- const char *ident) {
-
+ const char *ident)
+{
u_int te_class,priority_level,gmpls_switch_cap;
union { /* int to float conversion buffer for several subTLVs */
float f;
static int
isis_print_ext_is_reach(netdissect_options *ndo,
- const uint8_t *tptr, const char *ident, int tlv_type) {
-
+ const uint8_t *tptr, const char *ident, int tlv_type)
+{
char ident_buffer[20];
int subtlv_type,subtlv_len,subtlv_sum_len;
int proc_bytes = 0; /* how many bytes did we process ? */
static int
isis_print_mtid(netdissect_options *ndo,
- const uint8_t *tptr, const char *ident) {
-
+ const uint8_t *tptr, const char *ident)
+{
if (!ND_TTEST2(*tptr, 2))
return(0);
static int
isis_print_extd_ip_reach(netdissect_options *ndo,
- const uint8_t *tptr, const char *ident, uint16_t afi) {
-
+ const uint8_t *tptr, const char *ident, uint16_t afi)
+{
char ident_buffer[20];
#ifdef INET6
uint8_t prefix[sizeof(struct in6_addr)]; /* shared copy buffer for IPv4 and IPv6 prefixes */
* a juniper router if the payload data is encapsulated using PPP */
static int
juniper_ppp_heuristic_guess(netdissect_options *ndo,
- register const u_char *p, u_int length) {
-
+ register const u_char *p, u_int length)
+{
switch(EXTRACT_16BITS(p)) {
case PPP_IP :
case PPP_OSI :
static int
ip_heuristic_guess(netdissect_options *ndo,
- register const u_char *p, u_int length) {
-
+ register const u_char *p, u_int length)
+{
switch(p[0]) {
case 0x45:
case 0x46:
}
static int
-juniper_read_tlv_value(const u_char *p, u_int tlv_type, u_int tlv_len) {
-
+juniper_read_tlv_value(const u_char *p, u_int tlv_type, u_int tlv_len)
+{
int tlv_value;
/* TLVs < 128 are little endian encoded */
static int
juniper_parse_header(netdissect_options *ndo,
- const u_char *p, const struct pcap_pkthdr *h, struct juniper_l2info_t *l2info) {
-
+ const u_char *p, const struct pcap_pkthdr *h, struct juniper_l2info_t *l2info)
+{
const struct juniper_cookie_table_t *lp = juniper_cookie_table;
u_int idx, jnx_ext_len, jnx_header_len = 0;
uint8_t tlv_type,tlv_len;
static int
ldp_tlv_print(netdissect_options *ndo,
register const u_char *tptr,
- u_short msg_tlen) {
-
+ u_short msg_tlen)
+{
struct ldp_tlv_header {
uint8_t type[2];
uint8_t length[2];
void
ldp_print(netdissect_options *ndo,
- register const u_char *pptr, register u_int len) {
-
+ register const u_char *pptr, register u_int len)
+{
int processed;
while (len > (sizeof(struct ldp_common_header) + sizeof(struct ldp_msg_header))) {
processed = ldp_pdu_print(ndo, pptr);
static int
ldp_pdu_print(netdissect_options *ndo,
- register const u_char *pptr) {
-
+ register const u_char *pptr)
+{
const struct ldp_common_header *ldp_com_header;
const struct ldp_msg_header *ldp_msg_header;
const u_char *tptr,*msg_tptr;
}
static char *
-lldp_network_addr_print(netdissect_options *ndo, const u_char *tptr, u_int len) {
-
+lldp_network_addr_print(netdissect_options *ndo, const u_char *tptr, u_int len)
+{
uint8_t af;
static char buf[BUFSIZE];
const char * (*pfunc)(netdissect_options *, const u_char *);
static int
lldp_mgmt_addr_tlv_print(netdissect_options *ndo,
- const u_char *pptr, u_int len) {
-
+ const u_char *pptr, u_int len)
+{
uint8_t mgmt_addr_len, intf_num_subtype, oid_len;
const u_char *tptr;
u_int tlen;
void
lldp_print(netdissect_options *ndo,
- register const u_char *pptr, register u_int len) {
-
+ register const u_char *pptr, register u_int len)
+{
uint8_t subtype;
uint16_t tlv, cap, ena_cap;
u_int oui, tlen, hexdump, tlv_type, tlv_len;
void
lmp_print(netdissect_options *ndo,
- register const u_char *pptr, register u_int len) {
-
+ register const u_char *pptr, register u_int len)
+{
const struct lmp_common_header *lmp_com_header;
const struct lmp_object_header *lmp_obj_header;
const u_char *tptr,*obj_tptr;
void
lspping_print(netdissect_options *ndo,
- register const u_char *pptr, register u_int len) {
-
+ register const u_char *pptr, register u_int len)
+{
const struct lspping_common_header *lspping_com_header;
const struct lspping_tlv_header *lspping_tlv_header;
const struct lspping_tlv_header *lspping_subtlv_header;
void
lwapp_control_print(netdissect_options *ndo,
- const u_char *pptr, u_int len, int has_ap_ident) {
-
+ const u_char *pptr, u_int len, int has_ap_ident)
+{
const struct lwapp_transport_header *lwapp_trans_header;
const struct lwapp_control_header *lwapp_control_header;
const u_char *tptr;
void
lwapp_data_print(netdissect_options *ndo,
- const u_char *pptr, u_int len) {
-
+ const u_char *pptr, u_int len)
+{
const struct lwapp_transport_header *lwapp_trans_header;
const u_char *tptr;
int tlen;
};
void
-mpcp_print(netdissect_options *ndo, register const u_char *pptr, register u_int length) {
-
+mpcp_print(netdissect_options *ndo, register const u_char *pptr, register u_int length)
+{
union {
const struct mpcp_common_header_t *common_header;
const struct mpcp_grant_t *grant;
};
static const char *
-vlan_str(const uint16_t vid) {
+vlan_str(const uint16_t vid)
+{
static char buf[sizeof("65535 (bogus)")];
const char *fmt;
}
static const char *
-pcp_str(const uint8_t pcp) {
+pcp_str(const uint8_t pcp)
+{
static char buf[sizeof("255 (bogus)")];
snprintf(buf, sizeof(buf), pcp <= 7 ? "%u" : "%u (bogus)", pcp);
return buf;
static void
of10_bitmap_print(netdissect_options *ndo,
- const struct tok *t, const uint32_t v, const uint32_t u) {
+ const struct tok *t, const uint32_t v, const uint32_t u)
+{
const char *sep = " (";
if (v == 0)
static const u_char *
of10_data_print(netdissect_options *ndo,
- const u_char *cp, const u_char *ep, const u_int len) {
+ const u_char *cp, const u_char *ep, const u_int len)
+{
if (len == 0)
return cp;
/* data */
static const u_char *
of10_bsn_message_print(netdissect_options *ndo,
- const u_char *cp, const u_char *ep, const u_int len) {
+ const u_char *cp, const u_char *ep, const u_int len)
+{
const u_char *cp0 = cp;
uint32_t subtype;
static const u_char *
of10_bsn_actions_print(netdissect_options *ndo,
- const u_char *cp, const u_char *ep, const u_int len) {
+ const u_char *cp, const u_char *ep, const u_int len)
+{
const u_char *cp0 = cp;
uint32_t subtype, vlan_tag;
static const u_char *
of10_vendor_action_print(netdissect_options *ndo,
- const u_char *cp, const u_char *ep, const u_int len) {
+ const u_char *cp, const u_char *ep, const u_int len)
+{
uint32_t vendor;
const u_char *(*decoder)(netdissect_options *, const u_char *, const u_char *, const u_int);
static const u_char *
of10_vendor_message_print(netdissect_options *ndo,
- const u_char *cp, const u_char *ep, const u_int len) {
+ const u_char *cp, const u_char *ep, const u_int len)
+{
uint32_t vendor;
const u_char *(*decoder)(netdissect_options *, const u_char *, const u_char *, u_int);
/* Vendor ID is mandatory, data is optional. */
static const u_char *
of10_vendor_data_print(netdissect_options *ndo,
- const u_char *cp, const u_char *ep, const u_int len) {
+ const u_char *cp, const u_char *ep, const u_int len)
+{
uint32_t vendor;
if (len < 4)
static const u_char *
of10_packet_data_print(netdissect_options *ndo,
- const u_char *cp, const u_char *ep, const u_int len) {
+ const u_char *cp, const u_char *ep, const u_int len)
+{
if (len == 0)
return cp;
/* data */
/* [OF10] Section 5.2.1 */
static const u_char *
of10_phy_ports_print(netdissect_options *ndo,
- const u_char *cp, const u_char *ep, u_int len) {
+ const u_char *cp, const u_char *ep, u_int len)
+{
const u_char *cp0 = cp;
const u_int len0 = len;
/* [OF10] Section 5.2.2 */
static const u_char *
of10_queue_props_print(netdissect_options *ndo,
- const u_char *cp, const u_char *ep, u_int len) {
+ const u_char *cp, const u_char *ep, u_int len)
+{
const u_char *cp0 = cp;
const u_int len0 = len;
uint16_t property, plen, rate;
/* ibid */
static const u_char *
of10_queues_print(netdissect_options *ndo,
- const u_char *cp, const u_char *ep, u_int len) {
+ const u_char *cp, const u_char *ep, u_int len)
+{
const u_char *cp0 = cp;
const u_int len0 = len;
uint16_t desclen;
/* [OF10] Section 5.2.3 */
static const u_char *
of10_match_print(netdissect_options *ndo,
- const char *pfx, const u_char *cp, const u_char *ep) {
+ const char *pfx, const u_char *cp, const u_char *ep)
+{
uint32_t wildcards;
uint16_t dl_type;
uint8_t nw_proto;
static const u_char *
of10_actions_print(netdissect_options *ndo,
const char *pfx, const u_char *cp, const u_char *ep,
- u_int len) {
+ u_int len)
+{
const u_char *cp0 = cp;
const u_int len0 = len;
uint16_t type, alen, output_port;
/* [OF10] Section 5.3.1 */
static const u_char *
of10_features_reply_print(netdissect_options *ndo,
- const u_char *cp, const u_char *ep, const u_int len) {
+ const u_char *cp, const u_char *ep, const u_int len)
+{
/* datapath_id */
ND_TCHECK2(*cp, 8);
ND_PRINT((ndo, "\n\t dpid 0x%016" PRIx64, EXTRACT_64BITS(cp)));
/* [OF10] Section 5.3.3 */
static const u_char *
of10_flow_mod_print(netdissect_options *ndo,
- const u_char *cp, const u_char *ep, const u_int len) {
+ const u_char *cp, const u_char *ep, const u_int len)
+{
uint16_t command;
/* match */
/* ibid */
static const u_char *
of10_port_mod_print(netdissect_options *ndo,
- const u_char *cp, const u_char *ep) {
+ const u_char *cp, const u_char *ep)
+{
/* port_no */
ND_TCHECK2(*cp, 2);
ND_PRINT((ndo, "\n\t port_no %s", tok2str(ofpp_str, "%u", EXTRACT_16BITS(cp))));
/* [OF10] Section 5.3.5 */
static const u_char *
of10_stats_request_print(netdissect_options *ndo,
- const u_char *cp, const u_char *ep, u_int len) {
+ const u_char *cp, const u_char *ep, u_int len)
+{
const u_char *cp0 = cp;
const u_int len0 = len;
uint16_t type;
/* ibid */
static const u_char *
of10_desc_stats_reply_print(netdissect_options *ndo,
- const u_char *cp, const u_char *ep, const u_int len) {
+ const u_char *cp, const u_char *ep, const u_int len)
+{
if (len != OF_DESC_STATS_LEN)
goto corrupt;
/* mfr_desc */
/* ibid */
static const u_char *
of10_flow_stats_reply_print(netdissect_options *ndo,
- const u_char *cp, const u_char *ep, u_int len) {
+ const u_char *cp, const u_char *ep, u_int len)
+{
const u_char *cp0 = cp;
const u_int len0 = len;
uint16_t entry_len;
static const u_char *
of10_aggregate_stats_reply_print(netdissect_options *ndo,
const u_char *cp, const u_char *ep,
- const u_int len) {
+ const u_int len)
+{
if (len != OF_AGGREGATE_STATS_REPLY_LEN)
goto corrupt;
/* packet_count */
/* ibid */
static const u_char *
of10_table_stats_reply_print(netdissect_options *ndo,
- const u_char *cp, const u_char *ep, u_int len) {
+ const u_char *cp, const u_char *ep, u_int len)
+{
const u_char *cp0 = cp;
const u_int len0 = len;
/* ibid */
static const u_char *
of10_port_stats_reply_print(netdissect_options *ndo,
- const u_char *cp, const u_char *ep, u_int len) {
+ const u_char *cp, const u_char *ep, u_int len)
+{
const u_char *cp0 = cp;
const u_int len0 = len;
/* ibid */
static const u_char *
of10_queue_stats_reply_print(netdissect_options *ndo,
- const u_char *cp, const u_char *ep, u_int len) {
+ const u_char *cp, const u_char *ep, u_int len)
+{
const u_char *cp0 = cp;
const u_int len0 = len;
/* ibid */
static const u_char *
of10_stats_reply_print(netdissect_options *ndo,
- const u_char *cp, const u_char *ep, const u_int len) {
+ const u_char *cp, const u_char *ep, const u_int len)
+{
const u_char *cp0 = cp;
uint16_t type;
/* [OF10] Section 5.3.6 */
static const u_char *
of10_packet_out_print(netdissect_options *ndo,
- const u_char *cp, const u_char *ep, const u_int len) {
+ const u_char *cp, const u_char *ep, const u_int len)
+{
const u_char *cp0 = cp;
const u_int len0 = len;
uint16_t actions_len;
/* [OF10] Section 5.4.1 */
static const u_char *
of10_packet_in_print(netdissect_options *ndo,
- const u_char *cp, const u_char *ep, const u_int len) {
+ const u_char *cp, const u_char *ep, const u_int len)
+{
/* buffer_id */
ND_TCHECK2(*cp, 4);
ND_PRINT((ndo, "\n\t buffer_id %s", tok2str(bufferid_str, "0x%08x", EXTRACT_32BITS(cp))));
/* [OF10] Section 5.4.2 */
static const u_char *
of10_flow_removed_print(netdissect_options *ndo,
- const u_char *cp, const u_char *ep) {
+ const u_char *cp, const u_char *ep)
+{
/* match */
if (ep == (cp = of10_match_print(ndo, "\n\t ", cp, ep)))
return ep; /* end of snapshot */
/* [OF10] Section 5.4.4 */
static const u_char *
of10_error_print(netdissect_options *ndo,
- const u_char *cp, const u_char *ep, const u_int len) {
+ const u_char *cp, const u_char *ep, const u_int len)
+{
uint16_t type;
const struct tok *code_str;
const u_char *
of10_header_body_print(netdissect_options *ndo,
const u_char *cp, const u_char *ep, const uint8_t type,
- const uint16_t len, const uint32_t xid) {
+ const uint16_t len, const uint32_t xid)
+{
const u_char *cp0 = cp;
const u_int len0 = len;
/* Thus far message length is not less than the basic header size, but most
};
const char *
-of_vendor_name(const uint32_t vendor) {
+of_vendor_name(const uint32_t vendor)
+{
const struct tok *table = (vendor & 0xff000000) == 0 ? oui_values : onf_exp_str;
return tok2str(table, "unknown", vendor);
}
static void
of_header_print(netdissect_options *ndo, const uint8_t version, const uint8_t type,
- const uint16_t length, const uint32_t xid) {
+ const uint16_t length, const uint32_t xid)
+{
ND_PRINT((ndo, "\n\tversion unknown (0x%02x), type 0x%02x, length %u, xid 0x%08x",
version, type, length, xid));
}
/* Print a single OpenFlow message. */
static const u_char *
-of_header_body_print(netdissect_options *ndo, const u_char *cp, const u_char *ep) {
+of_header_body_print(netdissect_options *ndo, const u_char *cp, const u_char *ep)
+{
uint8_t version, type;
uint16_t length;
uint32_t xid;
/* Print a TCP segment worth of OpenFlow messages presuming the segment begins
* on a message boundary. */
void
-openflow_print(netdissect_options *ndo, const u_char *cp, const u_int len) {
+openflow_print(netdissect_options *ndo, const u_char *cp, const u_int len)
+{
const u_char *ep = cp + len;
ND_PRINT((ndo, ": OpenFlow"));
int
ospf_print_grace_lsa(netdissect_options *ndo,
- const uint8_t *tptr, u_int ls_length) {
-
+ const uint8_t *tptr, u_int ls_length)
+{
u_int tlv_type, tlv_length;
int
ospf_print_te_lsa(netdissect_options *ndo,
- const uint8_t *tptr, u_int ls_length) {
-
+ const uint8_t *tptr, u_int ls_length)
+{
u_int tlv_type, tlv_length, subtlv_type, subtlv_length;
u_int priority_level, te_class, count_srlg;
union { /* int to float conversion buffer for several subTLVs */
static void
handle_mlppp(netdissect_options *ndo,
- const u_char *p, int length) {
-
+ const u_char *p, int length)
+{
if (!ndo->ndo_eflag)
ND_PRINT((ndo, "MLPPP, "));
}
void
-rpki_rtr_print(netdissect_options *ndo, register const u_char *pptr, register u_int len) {
-
+rpki_rtr_print(netdissect_options *ndo, register const u_char *pptr, register u_int len)
+{
u_int tlen, pdu_type, pdu_len;
const u_char *tptr;
const rpki_rtr_pdu *pdu_header;
*/
static int
rsvp_intserv_print(netdissect_options *ndo,
- const u_char *tptr, u_short obj_tlen) {
-
+ const u_char *tptr, u_short obj_tlen)
+{
int parameter_id,parameter_length;
union {
float f;
_U_
#endif
, const u_char *tptr,
- const char *ident, u_int tlen) {
-
+ const char *ident, u_int tlen)
+{
const struct rsvp_object_header *rsvp_obj_header;
const u_char *obj_tptr;
union {
void
rsvp_print(netdissect_options *ndo,
- register const u_char *pptr, register u_int len) {
-
+ register const u_char *pptr, register u_int len)
+{
struct rsvp_common_header *rsvp_com_header;
const u_char *tptr,*subtptr;
u_short plen, tlen, subtlen;
static int
print_sflow_counter_generic(netdissect_options *ndo,
- const u_char *pointer, u_int len) {
-
+ const u_char *pointer, u_int len)
+{
const struct sflow_generic_counter_t *sflow_gen_counter;
if (len < sizeof(struct sflow_generic_counter_t))
static int
print_sflow_counter_ethernet(netdissect_options *ndo,
- const u_char *pointer, u_int len){
-
+ const u_char *pointer, u_int len)
+{
const struct sflow_ethernet_counter_t *sflow_eth_counter;
if (len < sizeof(struct sflow_ethernet_counter_t))
static int
print_sflow_counter_token_ring(netdissect_options *ndo _U_,
- const u_char *pointer _U_, u_int len _U_) {
-
+ const u_char *pointer _U_, u_int len _U_)
+{
return 0;
}
static int
print_sflow_counter_basevg(netdissect_options *ndo,
- const u_char *pointer, u_int len) {
-
+ const u_char *pointer, u_int len)
+{
const struct sflow_100basevg_counter_t *sflow_100basevg_counter;
if (len < sizeof(struct sflow_100basevg_counter_t))
static int
print_sflow_counter_vlan(netdissect_options *ndo,
- const u_char *pointer, u_int len) {
-
+ const u_char *pointer, u_int len)
+{
const struct sflow_vlan_counter_t *sflow_vlan_counter;
if (len < sizeof(struct sflow_vlan_counter_t))
static int
print_sflow_counter_processor(netdissect_options *ndo,
- const u_char *pointer, u_int len) {
-
+ const u_char *pointer, u_int len)
+{
const struct sflow_processor_counter_t *sflow_processor_counter;
if (len < sizeof(struct sflow_processor_counter_t))
static int
sflow_print_counter_records(netdissect_options *ndo,
- const u_char *pointer, u_int len, u_int records) {
-
+ const u_char *pointer, u_int len, u_int records)
+{
u_int nrecords;
const u_char *tptr;
u_int tlen;
return 0;
}
-
static int
sflow_print_counter_sample(netdissect_options *ndo,
- const u_char *pointer, u_int len) {
-
+ const u_char *pointer, u_int len)
+{
const struct sflow_counter_sample_t *sflow_counter_sample;
u_int nrecords;
u_int typesource;
static int
sflow_print_expanded_counter_sample(netdissect_options *ndo,
- const u_char *pointer, u_int len) {
-
+ const u_char *pointer, u_int len)
+{
const struct sflow_expanded_counter_sample_t *sflow_expanded_counter_sample;
u_int nrecords;
static int
print_sflow_raw_packet(netdissect_options *ndo,
- const u_char *pointer, u_int len) {
-
+ const u_char *pointer, u_int len)
+{
const struct sflow_expanded_flow_raw_t *sflow_flow_raw;
if (len < sizeof(struct sflow_expanded_flow_raw_t))
static int
print_sflow_ethernet_frame(netdissect_options *ndo,
- const u_char *pointer, u_int len) {
-
+ const u_char *pointer, u_int len)
+{
const struct sflow_ethernet_frame_t *sflow_ethernet_frame;
if (len < sizeof(struct sflow_ethernet_frame_t))
static int
print_sflow_extended_switch_data(netdissect_options *ndo,
- const u_char *pointer, u_int len) {
-
+ const u_char *pointer, u_int len)
+{
const struct sflow_extended_switch_data_t *sflow_extended_sw_data;
if (len < sizeof(struct sflow_extended_switch_data_t))
static int
sflow_print_flow_records(netdissect_options *ndo,
- const u_char *pointer, u_int len, u_int records) {
-
+ const u_char *pointer, u_int len, u_int records)
+{
u_int nrecords;
const u_char *tptr;
u_int tlen;
static int
sflow_print_flow_sample(netdissect_options *ndo,
- const u_char *pointer, u_int len) {
-
+ const u_char *pointer, u_int len)
+{
const struct sflow_flow_sample_t *sflow_flow_sample;
u_int nrecords;
u_int typesource;
static int
sflow_print_expanded_flow_sample(netdissect_options *ndo,
- const u_char *pointer, u_int len) {
-
+ const u_char *pointer, u_int len)
+{
const struct sflow_expanded_flow_sample_t *sflow_expanded_flow_sample;
u_int nrecords;
void
sflow_print(netdissect_options *ndo,
- const u_char *pptr, u_int len) {
-
+ const u_char *pptr, u_int len)
+{
const struct sflow_datagram_t *sflow_datagram;
const struct sflow_sample_header *sflow_sample;
void
slow_print(netdissect_options *ndo,
- register const u_char *pptr, register u_int len) {
-
+ register const u_char *pptr, register u_int len)
+{
int print_version;
slow_com_header = (const struct slow_common_header_t *)pptr;
static void
slow_marker_lacp_print(netdissect_options *ndo,
- register const u_char *tptr, register u_int tlen) {
-
+ register const u_char *tptr, register u_int tlen)
+{
const struct tlv_header_t *tlv_header;
const u_char *tlv_tptr;
u_int tlv_len, tlv_tlen;
static void
slow_oam_print(netdissect_options *ndo,
- register const u_char *tptr, register u_int tlen) {
-
+ register const u_char *tptr, register u_int tlen)
+{
u_int hexdump;
struct slow_oam_common_header_t {
*/
static const u_char *
-zmtp1_print_frame(netdissect_options *ndo, const u_char *cp, const u_char *ep) {
+zmtp1_print_frame(netdissect_options *ndo, const u_char *cp, const u_char *ep)
+{
uint64_t body_len_declared, body_len_captured, header_len;
uint8_t flags;
}
void
-zmtp1_print(netdissect_options *ndo, const u_char *cp, u_int len) {
+zmtp1_print(netdissect_options *ndo, const u_char *cp, u_int len)
+{
const u_char *ep = min(ndo->ndo_snapend, cp + len);
ND_PRINT((ndo, ": ZMTP/1.0"));
*/
static const u_char *
-zmtp1_print_intermediate_part(netdissect_options *ndo, const u_char *cp, const u_int len) {
+zmtp1_print_intermediate_part(netdissect_options *ndo, const u_char *cp, const u_int len)
+{
u_int frame_offset;
uint64_t remaining_len;
}
void
-zmtp1_print_datagram(netdissect_options *ndo, const u_char *cp, const u_int len) {
+zmtp1_print_datagram(netdissect_options *ndo, const u_char *cp, const u_int len)
+{
const u_char *ep = min(ndo->ndo_snapend, cp + len);
cp = zmtp1_print_intermediate_part(ndo, cp, len);