Changeset 850630f
- Timestamp:
- 02/16/05 17:36:52 (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:
- fb1de29
- Parents:
- 1cea750
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/trace.c
r1cea750 r850630f 798 798 799 799 /** get a pointer to the link layer 800 * @param libtrace a pointer to the trace object returned from gettrace 801 * @param buffer a pointer to a filled in buffer 802 * @param buflen a pointer to the size of the buffer 800 * @param packet a pointer to a libtrace_packet structure 803 801 * 804 802 * @returns a pointer to the link layer, or NULL if there is no link layer … … 848 846 849 847 /** get a pointer to the IP header (if any) 850 * @param libtrace a pointer to the trace object returned from gettrace 851 * @param buffer a pointer to a filled in buffer 852 * @param buflen a pointer to the size of the buffer 848 * @param packet a pointer to a libtrace_packet structure 853 849 * 854 850 * @returns a pointer to the IP header, or NULL if there is not an IP packet … … 912 908 913 909 /** get a pointer to the TCP header (if any) 914 * @param libtrace a pointer to the trace object returned from gettrace 915 * @param buffer a pointer to a filled in buffer 916 * @param buflen a pointer to the size of the buffer 910 * @param packet a pointer to a libtrace_packet structure 917 911 * 918 912 * @returns a pointer to the TCP header, or NULL if there is not a TCP packet … … 932 926 933 927 /** get a pointer to the UDP header (if any) 934 * @param libtrace a pointer to the trace object returned from gettrace 935 * @param buffer a pointer to a filled in buffer 936 * @param buflen a pointer to the size of the buffer 928 * @param packet a pointer to a libtrace_packet structure 937 929 * 938 930 * @returns a pointer to the UDP header, or NULL if this is not a UDP packet … … 952 944 953 945 /** get a pointer to the ICMP header (if any) 954 * @param libtrace a pointer to the trace object returned from gettrace 955 * @param buffer a pointer to a filled in buffer 956 * @param buflen a pointer to the size of the buffer 946 * @param packet a pointer to a libtrace_packet structure 957 947 * 958 948 * @returns a pointer to the ICMP header, or NULL if this is not a ICMP packet … … 972 962 973 963 /** Get the current time in DAG time format 974 * @param libtrace the libtrace opaque pointer 975 * @param buffer a pointer to a filled in buffer 976 * @param buflen the length of the buffer 964 * @param packet a pointer to a libtrace_packet structure 977 965 * @returns a 64 bit timestamp in DAG ERF format (upper 32 bits are the seconds 978 966 * past 1970-01-01, the lower 32bits are partial seconds) … … 1015 1003 1016 1004 /** Get the current time in struct timeval 1017 * @param libtrace the libtrace opaque pointer 1018 * @param buffer a pointer to a filled in buffer 1019 * @param buflen the length of the buffer 1005 * @param packet a pointer to a libtrace_packet structure 1006 * 1020 1007 * @returns time that this packet was seen in a struct timeval 1021 1008 * @author Daniel Lawson … … 1059 1046 1060 1047 /** Get the current time in floating point seconds 1061 * @param libtrace the libtrace opaque pointer 1062 * @param buffer a pointer to a filled in buffer 1063 * @param buflen the length of the buffer 1048 * @param packet a pointer to a libtrace_packet structure 1064 1049 * @returns time that this packet was seen in 64bit floating point seconds 1065 1050 * @author Perry Lorier … … 1120 1105 1121 1106 /** Get the size of the packet as it was seen on the wire. 1122 * @param libtrace the libtrace opaque pointer 1123 * @param buffer a pointer to a filled in buffer 1124 * @param buflen the length of the buffer 1107 * @param packet a pointer to a libtrace_packet structure 1108 * 1125 1109 * @returns the size of the packet as it was on the wire. 1126 1110 * @author Perry Lorier … … 1164 1148 1165 1149 /** Get the type of the link layer 1166 * @param libtrace the libtrace opaque pointer 1167 * @param buffer a pointer to a filled in buffer 1168 * @param buflen the length of the buffer 1150 * @param packet a pointer to a libtrace_packet structure 1169 1151 * @returns libtrace_linktype_t 1170 1152 * @author Perry Lorier … … 1213 1195 1214 1196 /** Get the source MAC addres 1215 * @param libtrace the libtrace opaque pointer 1216 * @param buffer a pointer to a filled in buffer 1217 * @param buflen the length of the buffer 1197 * @param packet a pointer to a libtrace_packet structure 1218 1198 * @returns a pointer to the source mac, (or NULL if there is no source MAC) 1219 1199 * @author Perry Lorier … … 1237 1217 1238 1218 /** Get the destination MAC addres 1239 * @param libtrace the libtrace opaque pointer 1240 * @param buffer a pointer to a filled in buffer 1241 * @param buflen the length of the buffer 1219 * @param packet a libtrace_packet pointer 1242 1220 * @returns a pointer to the destination mac, (or NULL if there is no 1243 1221 * destination MAC) … … 1265 1243 * @param trace the libtrace opaque pointer 1266 1244 * @param packet the libtrace_packet opaque pointer 1267 * @param fd a pointer to a file descriptor to listen on1268 * @param seconds a pointer the time in seconds since to the next event1269 1245 * @returns 1270 1246 * TRACE_EVENT_IOWAIT Waiting on I/O on <fd> … … 1381 1357 1382 1358 /** apply a BPF filter 1383 * @param libtrace the libtrace opaque pointer1384 1359 * @param filter the filter opaque pointer 1385 * @param buffer a pointer to a filled buffer 1386 * @param buflen the length of the buffer 1360 * @param packet the packet opaque pointer 1387 1361 * @returns 0 if the filter fails, 1 if it succeeds 1388 1362 * @author Daniel Lawson … … 1459 1433 1460 1434 /** Get the direction flag, if it has one 1461 * @param libtrace the libtrace opaque pointer 1462 * @param buffer a point to a fille in buffer 1463 * @param buflen the length of the buffer 1435 * @param packet a pointer to a libtrace_packet structure 1464 1436 * @returns a signed value containing the direction flag, or -1 if this is not supported 1465 1437 * @author Daniel Lawson … … 1605 1577 /** Truncate the packet at the suggested length 1606 1578 * @param packet the packet opaque pointer 1607 * @param lenthe new length of the packet1579 * @param size the new length of the packet 1608 1580 * @returns the new length of the packet, or the original length of the 1609 1581 * packet if unchanged
Note: See TracChangeset
for help on using the changeset viewer.