* switch chips, and extra encapsulation header information before
* printing Ethernet header information (such as a LANE ID for ATM LANE).
*/
* switch chips, and extra encapsulation header information before
* printing Ethernet header information (such as a LANE ID for ATM LANE).
*/
ether_common_print(netdissect_options *ndo, const u_char *p, u_int length,
u_int caplen,
void (*print_switch_tag)(netdissect_options *ndo, const u_char *),
u_int switch_tag_len,
void (*print_encap_header)(netdissect_options *ndo, const u_char *),
ether_common_print(netdissect_options *ndo, const u_char *p, u_int length,
u_int caplen,
void (*print_switch_tag)(netdissect_options *ndo, const u_char *),
u_int switch_tag_len,
void (*print_encap_header)(netdissect_options *ndo, const u_char *),
- int ret = macsec_print(ndo, &p, &length, &caplen, &hdrlen);
+ int ret = macsec_print(ndo, &p, &length, &caplen, &hdrlen,
+ &src, &dst);
if (!ndo->ndo_suppress_default_print)
ND_DEFAULTPRINT(p, caplen);
if (!ndo->ndo_suppress_default_print)
ND_DEFAULTPRINT(p, caplen);
}
ether_type_print(ndo, length_type);
ND_PRINT(", length %u: ", orig_length);
}
ether_type_print(ndo, length_type);
ND_PRINT(", length %u: ", orig_length);
ether_switch_tag_print(netdissect_options *ndo, const u_char *p, u_int length,
u_int caplen,
void (*print_switch_tag)(netdissect_options *, const u_char *),
ether_switch_tag_print(netdissect_options *ndo, const u_char *p, u_int length,
u_int caplen,
void (*print_switch_tag)(netdissect_options *, const u_char *),
- return (ether_common_print(ndo, p, length, caplen, print_switch_tag,
- switch_tag_len, NULL, NULL));
+ ether_common_print(ndo, p, length, caplen, print_switch_tag,
+ switch_tag_len, NULL, NULL, do_incr_ll_hdr_len);
ether_print(netdissect_options *ndo,
const u_char *p, u_int length, u_int caplen,
void (*print_encap_header)(netdissect_options *ndo, const u_char *),
ether_print(netdissect_options *ndo,
const u_char *p, u_int length, u_int caplen,
void (*print_encap_header)(netdissect_options *ndo, const u_char *),
- return (ether_common_print(ndo, p, length, caplen, NULL, 0,
- print_encap_header, encap_header_arg));
+ ether_common_print(ndo, p, length, caplen, NULL, 0,
+ print_encap_header, encap_header_arg, do_incr_ll_hdr_len);
* of the packet off the wire, and 'h->caplen' is the number
* of bytes actually captured.
*/
* of the packet off the wire, and 'h->caplen' is the number
* of bytes actually captured.
*/
- ndo->ndo_protocol = "ether_if";
- return (ether_print(ndo, p, h->len, h->caplen, NULL, NULL));
+ ndo->ndo_protocol = "ether";
+ ndo->ndo_ll_hdr_len += 0;
+
+ ether_print(ndo, p, h->len, h->caplen, NULL, NULL, TRUE);
* This is for DLT_NETANALYZER, which has a 4-byte pseudo-header
* before the Ethernet header.
*/
* This is for DLT_NETANALYZER, which has a 4-byte pseudo-header
* before the Ethernet header.
*/
netanalyzer_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h,
const u_char *p)
{
/*
* Fail if we don't have enough data for the Hilscher pseudo-header.
*/
netanalyzer_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h,
const u_char *p)
{
/*
* Fail if we don't have enough data for the Hilscher pseudo-header.
*/
- return (4 + ether_print(ndo, p + 4, h->len - 4, h->caplen - 4, NULL, NULL));
+ ether_print(ndo, p + 4, h->len - 4, h->caplen - 4, NULL, NULL, TRUE);
* pseudo-header, a 7-byte Ethernet preamble, and a 1-byte Ethernet SOF
* before the Ethernet header.
*/
* pseudo-header, a 7-byte Ethernet preamble, and a 1-byte Ethernet SOF
* before the Ethernet header.
*/
netanalyzer_transparent_if_print(netdissect_options *ndo,
const struct pcap_pkthdr *h,
const u_char *p)
netanalyzer_transparent_if_print(netdissect_options *ndo,
const struct pcap_pkthdr *h,
const u_char *p)
- return (12 + ether_print(ndo, p + 12, h->len - 12, h->caplen - 12, NULL, NULL));
+ ether_print(ndo, p + 12, h->len - 12, h->caplen - 12, NULL, NULL, TRUE);