Changeset 17dc71c
- Timestamp:
- 11/28/12 15:49:05 (8 years ago)
- Branches:
- 4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
- Children:
- 1935565
- Parents:
- d500159
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/format_linux.c
rd500159 r17dc71c 1094 1094 } 1095 1095 1096 static inline libtrace_linktype_t get_libtrace_link_type( int linktype){1096 static inline libtrace_linktype_t get_libtrace_link_type(uint16_t linktype){ 1097 1097 /* Convert the ARPHRD type into an appropriate libtrace link type */ 1098 1098 switch (linktype) { … … 1115 1115 } 1116 1116 static libtrace_linktype_t linuxnative_get_link_type(const struct libtrace_packet_t *packet) { 1117 int linktype=(((struct libtrace_linuxnative_header*)(packet->buffer))1117 uint16_t linktype=(((struct libtrace_linuxnative_header*)(packet->buffer)) 1118 1118 ->hdr.sll_hatype); 1119 1119 return get_libtrace_link_type(linktype); 1120 1120 } 1121 1121 static libtrace_linktype_t linuxring_get_link_type(const struct libtrace_packet_t *packet) { 1122 int linktype= GET_SOCKADDR_HDR(packet->buffer)->sll_hatype;1122 uint16_t linktype= GET_SOCKADDR_HDR(packet->buffer)->sll_hatype; 1123 1123 return get_libtrace_link_type(linktype); 1124 1124 } 1125 1125 1126 static inline libtrace_direction_t get_libtrace_direction( int pkttype){1126 static inline libtrace_direction_t get_libtrace_direction(uint8_t pkttype){ 1127 1127 switch (pkttype) { 1128 1128 case PACKET_OUTGOING: … … 1134 1134 } 1135 1135 static libtrace_direction_t linuxnative_get_direction(const struct libtrace_packet_t *packet) { 1136 return get_libtrace_ link_type(((struct libtrace_linuxnative_header*)(packet->buffer))->hdr.sll_pkttype);1136 return get_libtrace_direction(((struct libtrace_linuxnative_header*)(packet->buffer))->hdr.sll_pkttype); 1137 1137 } 1138 1138 static libtrace_direction_t linuxring_get_direction(const struct libtrace_packet_t *packet) { 1139 return get_libtrace_ link_type(GET_SOCKADDR_HDR(packet->buffer)->sll_pkttype);1139 return get_libtrace_direction(GET_SOCKADDR_HDR(packet->buffer)->sll_pkttype); 1140 1140 } 1141 1141
Note: See TracChangeset
for help on using the changeset viewer.