Deleted Added
full compact
print-lane.c (214478) print-lane.c (235530)
1/*
2 * Marko Kiiskila carnil@cs.tut.fi
3 *
4 * Tampere University of Technology - Telecommunications Laboratory
5 *
6 * Permission to use, copy, modify and distribute this
7 * software and its documentation is hereby granted,
8 * provided that both the copyright notice and this

--- 47 unchanged lines hidden (view full) ---

56 { 0x0007, "flush request" },
57 { 0x0107, "flush response" },
58 { 0x0008, "NARP request" },
59 { 0x0009, "topology request" },
60 { 0, NULL }
61};
62
63static void
1/*
2 * Marko Kiiskila carnil@cs.tut.fi
3 *
4 * Tampere University of Technology - Telecommunications Laboratory
5 *
6 * Permission to use, copy, modify and distribute this
7 * software and its documentation is hereby granted,
8 * provided that both the copyright notice and this

--- 47 unchanged lines hidden (view full) ---

56 { 0x0007, "flush request" },
57 { 0x0107, "flush response" },
58 { 0x0008, "NARP request" },
59 { 0x0009, "topology request" },
60 { 0, NULL }
61};
62
63static void
64lane_hdr_print(const u_char *bp)
64lane_hdr_print(netdissect_options *ndo, const u_char *bp)
65{
65{
66 (void)printf("lecid:%x ", EXTRACT_16BITS(bp));
66 (void)ND_PRINT((ndo, "lecid:%x ", EXTRACT_16BITS(bp)));
67}
68
69/*
70 * This is the top level routine of the printer. 'p' points
71 * to the LANE header of the packet, 'h->ts' is the timestamp,
72 * 'h->len' is the length of the packet off the wire, and 'h->caplen'
73 * is the number of bytes actually captured.
74 *

--- 26 unchanged lines hidden (view full) ---

101 length -= 2;
102 caplen -= 2;
103 p += 2;
104
105 /*
106 * Now print the encapsulated frame, under the assumption
107 * that it's an Ethernet frame.
108 */
67}
68
69/*
70 * This is the top level routine of the printer. 'p' points
71 * to the LANE header of the packet, 'h->ts' is the timestamp,
72 * 'h->len' is the length of the packet off the wire, and 'h->caplen'
73 * is the number of bytes actually captured.
74 *

--- 26 unchanged lines hidden (view full) ---

101 length -= 2;
102 caplen -= 2;
103 p += 2;
104
105 /*
106 * Now print the encapsulated frame, under the assumption
107 * that it's an Ethernet frame.
108 */
109 ether_print(p, length, caplen, lane_hdr_print, p - 2);
109 ether_print(gndo, p, length, caplen, lane_hdr_print, p - 2);
110}
111
112u_int
113lane_if_print(const struct pcap_pkthdr *h, const u_char *p)
114{
115 lane_print(p, h->len, h->caplen);
116
117 return (sizeof(struct lecdatahdr_8023));
118}
110}
111
112u_int
113lane_if_print(const struct pcap_pkthdr *h, const u_char *p)
114{
115 lane_print(p, h->len, h->caplen);
116
117 return (sizeof(struct lecdatahdr_8023));
118}