Changeset 7f32bb5
- Timestamp:
- 02/10/06 11:08:49 (15 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:
- 7068467
- Parents:
- 37195b4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/libtrace.h
r56ef532 r7f32bb5 277 277 void trace_perror(const char *caller); 278 278 279 /** @name Creation and destruction of traces 280 * These members deal with creating, configuring and cleaning up a trace object 281 */ 282 //@{ 283 279 284 /** Create a trace file from a URI 280 285 * … … 357 362 */ 358 363 void trace_destroy_output(struct libtrace_out_t *trace); 364 //@} 365 366 /** @name Reading/Writing packets 367 * These members deal with creating, reading and writing packets 368 */ 369 //@{ 359 370 360 371 /** Create a new packet object … … 387 398 */ 388 399 int trace_write_packet(struct libtrace_out_t *trace, const struct libtrace_packet_t *packet); 400 //@} 401 402 /** @name Headers 403 * These functions locate and return a pointer to various headers inside a packet 404 */ 405 //@{ 389 406 390 407 /** get a pointer to the link layer … … 483 500 SIMPLE_FUNCTION 484 501 struct libtrace_icmp *trace_get_icmp_from_ip(const struct libtrace_ip *ip,int *skipped); 502 //@} 485 503 486 504 /** parse an ip or tcp option … … 507 525 508 526 527 /** @name Time 528 * These functions deal with time that a packet arrived and return it 529 * in various formats 530 */ 531 //@{ 509 532 /** Get the current time in DAG time format 510 533 * @param packet the packet opaque pointer … … 536 559 SIMPLE_FUNCTION 537 560 double trace_get_seconds(const struct libtrace_packet_t *packet); 538 561 //@} 562 563 /** @name Sizes 564 * This section deals with finding or setting the various different lengths 565 * a packet can have 566 */ 567 //@{ 539 568 /** Get the size of the packet in the trace 540 569 * @param packet the packet opaque pointer … … 572 601 SIMPLE_FUNCTION 573 602 int trace_get_framing_length(const struct libtrace_packet_t *packet); 603 604 /** Truncate the packet at the suggested length 605 * @param packet the packet opaque pointer 606 * @param size the new length of the packet 607 * @returns the new length of the packet, or the original length of the 608 * packet if unchanged 609 * @author Daniel Lawson 610 */ 611 size_t trace_set_capture_length(struct libtrace_packet_t *packet, size_t size); 612 613 //@} 574 614 575 615 … … 619 659 uint8_t *trace_get_source_mac(const struct libtrace_packet_t *packet); 620 660 621 /** Truncate the packet at the suggested length622 * @param packet the packet opaque pointer623 * @param size the new length of the packet624 * @returns the new length of the packet, or the original length of the625 * packet if unchanged626 * @author Daniel Lawson627 */628 size_t trace_set_capture_length(struct libtrace_packet_t *packet, size_t size);629 630 661 /** Set the direction flag, if it has one 631 662 * @param packet the packet opaque pointer … … 681 712 struct libtrace_packet_t *packet); 682 713 714 /** @name BPF 715 * This section deals with using Berkley Packet Filters 716 */ 717 //@{ 683 718 /** setup a BPF filter 684 719 * @param filterstring a char * containing the bpf filter string … … 703 738 int trace_bpf_filter(struct libtrace_filter_t *filter, 704 739 const struct libtrace_packet_t *packet); 705 740 //@} 706 741 707 742 /** Which port is the server port */
Note: See TracChangeset
for help on using the changeset viewer.