Changeset 52f8fc2 for lib/trace.c
- Timestamp:
- 02/23/06 13:14:32 (16 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:
- 8ea5b38
- Parents:
- aa62105
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/trace.c
r91c9552 r52f8fc2 558 558 * 559 559 */ 560 int trace_read_packet( struct libtrace_t *libtrace, structlibtrace_packet_t *packet) {560 int trace_read_packet(libtrace_t *libtrace, libtrace_packet_t *packet) { 561 561 562 562 assert(libtrace && "You called trace_read_packet() with a NULL libtrace parameter!\n"); … … 1027 1027 * @author Daniel Lawson 1028 1028 */ 1029 uint64_t trace_get_erf_timestamp(const structlibtrace_packet_t *packet) {1029 uint64_t trace_get_erf_timestamp(const libtrace_packet_t *packet) { 1030 1030 uint64_t timestamp = 0; 1031 1031 double seconds = 0.0; … … 1058 1058 * @author Perry Lorier 1059 1059 */ 1060 struct timeval trace_get_timeval(const structlibtrace_packet_t *packet) {1060 struct timeval trace_get_timeval(const libtrace_packet_t *packet) { 1061 1061 struct timeval tv; 1062 1062 uint64_t ts = 0; … … 1121 1121 } 1122 1122 1123 /* Get the size of the packet in the trace1124 * @param packet the packet opaque pointer1125 * @returns the size of the packet in the trace1126 * @author Perry Lorier1127 * @note The return size refers to the network-level payload of the packet and1128 * does not include any capture headers. For example, an Ethernet packet with1129 * an empty TCP packet will return sizeof(ethernet_header) + sizeof(ip_header)1130 * + sizeof(tcp_header).1131 * @note Due to this being a header capture, or anonymisation, this may not1132 * be the same size as the original packet. See trace_get_wire_length() for the1133 * original size of the packet.1134 * @note This can (and often is) different for different packets in a trace!1135 * @note This is sometimes called the "snaplen".1136 */1137 1123 int trace_get_capture_length(const struct libtrace_packet_t *packet) { 1138 1124 … … 1173 1159 */ 1174 1160 SIMPLE_FUNCTION 1175 int trace_get_framing_length(const structlibtrace_packet_t *packet) {1161 int trace_get_framing_length(const libtrace_packet_t *packet) { 1176 1162 if (packet->trace->format->get_framing_length) { 1177 1163 return packet->trace->format->get_framing_length(packet); … … 1187 1173 * @author Daniel Lawson 1188 1174 */ 1189 libtrace_linktype_t trace_get_link_type(const structlibtrace_packet_t *packet ) {1175 libtrace_linktype_t trace_get_link_type(const libtrace_packet_t *packet ) { 1190 1176 if (packet->trace->format->get_link_type) { 1191 1177 return packet->trace->format->get_link_type(packet);
Note: See TracChangeset
for help on using the changeset viewer.