void gre_sre_print(u_int16_t af, u_int8_t sreoff, u_int8_t srelen, const u_char *bp, u_int len) { switch (af) { case GRESRE_IP: printf(", (rtaf=ip"); gre_sre_ip_print(sreoff, srelen, bp, len); printf(") "); break; case GRESRE_ASN: printf(", (rtaf=asn"); gre_sre_asn_print(sreoff, srelen, bp, len); printf(") "); break; default: printf(", (rtaf=0x%x) ", af); } }
static void gre_sre_print(netdissect_options *ndo, uint16_t af, uint8_t sreoff, uint8_t srelen, const u_char *bp, u_int len) { switch (af) { case GRESRE_IP: ND_PRINT((ndo, ", (rtaf=ip")); gre_sre_ip_print(ndo, sreoff, srelen, bp, len); ND_PRINT((ndo, ") ")); break; case GRESRE_ASN: ND_PRINT((ndo, ", (rtaf=asn")); gre_sre_asn_print(ndo, sreoff, srelen, bp, len); ND_PRINT((ndo, ") ")); break; default: ND_PRINT((ndo, ", (rtaf=0x%x) ", af)); } }
static int gre_sre_print(netdissect_options *ndo, uint16_t af, uint8_t sreoff, uint8_t srelen, const u_char *bp, u_int len) { int ret; switch (af) { case GRESRE_IP: ND_PRINT(", (rtaf=ip"); ret = gre_sre_ip_print(ndo, sreoff, srelen, bp, len); ND_PRINT(")"); break; case GRESRE_ASN: ND_PRINT(", (rtaf=asn"); ret = gre_sre_asn_print(ndo, sreoff, srelen, bp, len); ND_PRINT(")"); break; default: ND_PRINT(", (rtaf=0x%x)", af); ret = 1; } return (ret); }