Changeset aa22b5b for lib/libtrace.h.in
- Timestamp:
- 10/31/08 13:51:59 (14 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:
- 13fd6e1
- Parents:
- 5d4e520
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/libtrace.h.in
r530cef6 raa22b5b 1077 1077 * wireless monitoring header. 1078 1078 * 1079 * If the header is truncated, this function will return NULL, and remaining will be 0. 1080 * If there are 0 bytes of payload, the function will return a pointer, and remaining will be 0. 1081 * 1079 1082 * @param[in] meta a pointer to a header 1080 1083 * @param[in,out] linktype the linktype of meta (updated to indicate the … … 1085 1088 * unchanged. 1086 1089 * 1087 * All parameters are mandatory. NULL will be returned if any are NULL.1090 * All parameters are mandatory. 1088 1091 */ 1089 1092 DLLEXPORT void *trace_get_payload_from_meta(const void *meta, … … 1116 1119 * @param l2 The pointer to the current layer2 header 1117 1120 * @param linktype The type of the layer2 header 1118 * @param[out] ethertype An optional output variable of the ethernet type 1119 * @param[in,out] remaining Optionally updated with the length remaining1121 * @param[out] ethertype An optional output variable of the ethernet type of the new header 1122 * @param[in,out] remaining Updated with the length remaining 1120 1123 * 1121 1124 * @return a pointer to the transport layer header, or NULL if header isn't 1122 1125 * present. 1123 1126 * 1124 * type may be NULL if not needed. 1125 * 1126 * Remaining may be NULL. If Remaining is not NULL it must point to the number 1127 * of bytes captured of the layer2 header and beyond. It will be decremented 1128 * by the number of bytes skipped to find the payload. 1127 * Remaining must point to the number of bytes captured of the layer2 header 1128 * and beyond. It will be decremented by the number of bytes skipped to find 1129 * the payload. 1130 * 1131 * If the layer2 header is complete but there are zero bytes of payload after the end of the header, 1132 * a pointer to where the payload would be is returned and remaining will be set to 0. If the 1133 * layer2 header is incomplete (truncated), then NULL is returned and remaining will be set to 0. 1129 1134 * 1130 1135 */ … … 1169 1174 * present. 1170 1175 * 1171 * Remaining may be NULL. If Remaining is not NULL it must point to the number 1172 * of bytes captured of the IP header and beyond. It will be decremented by 1173 * the length of the IPv4 header (including any options). 1174 * 1175 * proto may be NULL if not needed. 1176 * Remaining will be decremented by the size of the IPv4 header (including any options). 1177 * If the IPv4 header is complete but there are zero bytes of payload after the IPv4 header, a pointer 1178 * to where the payload would be is returned and remaining will be set to 0. If the IPv4 header is 1179 * incomplete, NULL will be returned and remaining will be set to 0. 1180 * 1181 * proto may be NULL, in which case it won't be updated 1176 1182 * 1177 1183 * @note This is similar to trace_get_transport_from_ip in libtrace2 … … 1188 1194 * isn't complete. 1189 1195 * 1190 * Remaining may be NULL. If Remaining is not NULL it must point to the number 1191 * of bytes captured of the IP header and beyond. It will be decremented by 1192 * this function by the length of the IPV6 header. 1193 * 1194 * proto may be NULL if not needed. 1196 * Remaining will be decremented by the size of the IPv6 header (including any options). 1197 * If the IPv6 header is complete but there are zero bytes of payload after the IPv6 header, a pointer 1198 * to where the payload would be is returned and remaining will be set to 0. If the IPv6 header is 1199 * incomplete, NULL will be returned and remaining will be set to 0. 1200 * 1201 * proto may be NULL, in which case it won't be updated. 1195 1202 * 1196 1203 */ … … 1218 1225 uint16_t *type, uint32_t *remaining); 1219 1226 1220 /** Skips over any 802.1q header s, if present.1227 /** Skips over any 802.1q header, if present. 1221 1228 * @param vlan A pointer to the vlan header 1222 * @param[ in,out] type The ethernet type, replaced with the vlan ether type1229 * @param[out] type The ethernet type, replaced with the vlan ether type 1223 1230 * @param[in,out] remaining Updated with the number of bytes remaining 1224 1231 * 1225 1232 * @return a pointer to the header beyond the vlan header, if present. 1226 * Otherwise, returns NULL 1227 * 1228 * Remaining may be NULL. If Remaining is not NULL it must point to the number 1229 * of bytes captured past (but not including) the link layer. This function 1230 * will decrement it by the length of the 802.1q headers if present. 1231 * 1232 * Type must point to the value of the ethernet type. Libtrace will assert 1233 * fail if type is NULL. 1233 * Otherwise, returns NULL. 1234 * 1235 * Remaining will be decremented by the size of the vlan header. If the vlan 1236 * header is complete but there are zero bytes of payload after the vlan 1237 * header, a pointer to where the payload would be is returned and remaining 1238 * will be set to 0. If the vlan header is incomplete, NULL will be returned 1239 * and remaining will be set to 0. 1240 * 1241 * type will be set to the ethertype contained within the vlan payload. 1234 1242 * 1235 1243 */ … … 1237 1245 void *vlan, uint16_t *type, uint32_t *remaining); 1238 1246 1239 /** Skips over a ny MPLS headers, if present.1247 /** Skips over a MPLS header 1240 1248 * @param mpls A pointer to the mpls header 1241 * @param[ in,out] type The ethernet type, replaced by the ether type of the1249 * @param[out] type The ethernet type, replaced by the ether type of the 1242 1250 * following header - 0x0000 if an Ethernet header is deemed to be next 1243 1251 * @param[in,out] remaining Updated with the number of bytes remaining … … 1245 1253 * @return a pointer to the header beyond the MPLS label, if present. Will 1246 1254 * return NULL if there is not enough bytes remaining to skip past the MPLS 1247 * label or if the ether type is not MPLS. 1248 * 1249 * Remaining may be NULL. If remaining is not NULL it must point to the number 1250 * of bytes captured past (but not including) the link layer. This function 1251 * will decrement it by the length of the topmost MPLS label if present. 1255 * label. 1256 * 1257 * Remaining will be decremented by the size of the MPLS header. If the MPLS 1258 * header is complete but there are zero bytes of payload after the MPLS 1259 * header, a pointer to where the payload would be is returned and remaining 1260 * will be set to 0. If the MPLS header is incomplete, NULL will be returned 1261 * and remaining will be set to 0. 1252 1262 * 1253 1263 * Type must point to the value of the ethernet type. Libtrace will assert … … 1266 1276 * @param[in,out] remaining Updated with the number of bytes remaining 1267 1277 * 1268 * @return a pointer to the tcp payload, or NULL if the payload isn't present. 1269 * 1270 * Remaining may be NULL. If remaining is not NULL it must point to the number 1271 * of bytes captured of the TCP header and beyond. It will be decremented by 1272 * this function by the length of the TCP header (including any options). 1278 * @return a pointer to the tcp payload, or NULL if the tcp header is truncated. 1279 * 1280 * Remaining will be decremented by the size of the TCP header. If the TCP 1281 * header is complete but there are zero bytes of payload after the TCP 1282 * header, a pointer to where the payload would be is returned and remaining 1283 * will be set to 0. If the TCP header is incomplete, NULL will be returned 1284 * and remaining will be set to 0. 1273 1285 * 1274 1286 */ … … 1280 1292 * @param[in,out] remaining Updated with the number of bytes remaining 1281 1293 * 1282 * @return a pointer to the udp payload, or NULL if the payload isn't present. 1283 * 1284 * Remaining may be NULL. If Remaining is not NULL it must point to the number 1285 * of bytes captured of the UDP header and beyond. It will be decremented by 1286 * this function to the number of bytes remaining after the UDP header. 1294 * @return a pointer to the udp payload, or NULL if the udp header is truncated. 1295 * 1296 * Remaining will be decremented by the size of the TCP header. If the TCP 1297 * header is complete but there are zero bytes of payload after the TCP 1298 * header, a pointer to where the payload would be is returned and remaining 1299 * will be set to 0. If the TCP header is incomplete, NULL will be returned 1300 * and remaining will be set to 0. 1287 1301 * 1288 1302 */ … … 1293 1307 * @param[in,out] remaining Updated with the number of bytes remaining 1294 1308 * 1295 * @return a pointer to the icmp payload, or NULL if the payload isn't present. 1296 * 1297 * Remaining may be NULL. If remaining is not NULL it must point to the number 1298 * of bytes captured of the ICMP header and beyond. It will be decremented 1299 * by the number of bytes in the ICMP header. 1309 * @return a pointer to the icmp payload, or NULL if the icmp header is truncated. 1310 * 1311 * Remaining will be decremented by the size of the TCP header. If the TCP 1312 * header is complete but there are zero bytes of payload after the TCP 1313 * header, a pointer to where the payload would be is returned and remaining 1314 * will be set to 0. If the TCP header is incomplete, NULL will be returned 1315 * and remaining will be set to 0. 1300 1316 * 1301 1317 */
Note: See TracChangeset
for help on using the changeset viewer.