Changeset 6b98325 for lib/libtrace_parallel.h
- Timestamp:
- 03/23/15 17:52:17 (7 years ago)
- Branches:
- 4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, 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:
- 773d5e2
- Parents:
- 963b13b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/libtrace_parallel.h
r1407294 r6b98325 85 85 size_t size; 86 86 87 /* C basic types - we cannot be cert ian of the size */87 /* C basic types - we cannot be certain of the size */ 88 88 int sint; 89 89 unsigned int uint; … … 112 112 int type; 113 113 }; 114 115 typedef enum {116 /**117 * Sets the hasher function, if NULL(default) no hashing is used a118 * cores will get packets on a first in first served basis119 */120 TRACE_OPTION_SET_HASHER,121 122 /**123 * Libtrace set perpkt thread count124 */125 TRACE_OPTION_SET_PERPKT_THREAD_COUNT,126 127 /**128 * Delays packets so they are played back in trace-time rather than as fast129 * as possible.130 */131 TRACE_OPTION_TRACETIME,132 133 /**134 * Specifies the interval between tick packets in milliseconds, if 0135 * or less this is ignored.136 */137 TRACE_OPTION_TICK_INTERVAL,138 TRACE_OPTION_GET_CONFIG,139 TRACE_OPTION_SET_CONFIG140 } trace_parallel_option_t;141 114 142 115 /** The libtrace_messages enum … … 256 229 MESSAGE_POST_REPORTER, 257 230 258 /** Sent to per-packet threads per odically after the configured time231 /** Sent to per-packet threads periodically after the configured time 259 232 * interval has passed. 260 233 * 261 234 * This is sent out-of-band with respect to packets and as a result 262 * can appear after a packet with an later time stamp, or before one263 * with an earlier time stamp.264 * 265 * @param data data.uint64_t holds the system time stamp in the235 * can appear after a packet with an later time-stamp, or before one 236 * with an earlier time-stamp. 237 * 238 * @param data data.uint64_t holds the system time-stamp in the 266 239 * erf format 267 240 * @param sender should be ignored … … 280 253 MESSAGE_TICK_COUNT, 281 254 282 /** For specific user defined messages use codes above MESSAGE_USER. */255 /** For specific user defined messages use codes of MESSAGE_USER or above. */ 283 256 MESSAGE_USER = 1000 284 257 }; 285 258 286 /** The hasher types ava liable to libtrace application.259 /** The hasher types available to libtrace application. 287 260 * These can be selected using trace_set_hasher(). 288 261 */ … … 321 294 typedef struct libtrace_info_t { 322 295 /** 323 * True if a live format (i.e. packets have to be trace time).296 * True if a live format (i.e. packets have to be trace-time). 324 297 * Otherwise false, indicating packets can be read as fast 325 298 * as possible from the format. … … 339 312 } libtrace_info_t; 340 313 341 342 /**343 * Tuning the parallel sizes344 */345 struct user_configuration {346 // Packet memory cache settings (ocache_init) total347 /**348 * See diagrams, this sets the maximum size of freelist used to349 * maintain packets and their memory buffers.350 * NOTE setting this to less than recommend could cause deadlock a351 * trace that manages its own packets.352 * A unblockable error message will be printed.353 */354 size_t packet_cache_size;355 /**356 * Per thread local cache size for the packet freelist357 */358 size_t packet_thread_cache_size;359 /**360 * If true the total number of packets that can be created by a trace is limited361 * to the packet_cache_size, otherwise once packet_cache_size is exceeded alloc362 * and free will be used to create and free packets, this will be slower than363 * using the freelist and could run a machine out of memory.364 *365 * However this does make it easier to ensure that deadlocks will not occur366 * due to running out of packets367 */368 bool fixed_packet_count;369 /**370 * When reading from a single threaded input source to reduce371 * lock contention a 'burst' of packets is read per pkt thread372 * this determines the bursts size.373 */374 size_t burst_size;375 // Each perpkt thread has a queue leading into the reporter376 //size_t reporter_queue_size;377 378 /**379 * The tick interval - in milliseconds380 * When a live trace is used messages are sent at the tick381 * interval to ensure that all perpkt threads receive data382 * this allows results to be printed in cases flows are383 * not being directed to a certian thread, while still384 * maintaining order.385 */386 size_t tick_interval;387 388 /**389 * Like the tick interval but used in the case of file format390 * This specifies the number of packets before inserting a tick to391 * every thread.392 */393 size_t tick_count;394 395 /**396 * The number of per packet threads requested, 0 means use default.397 * Default typically be the number of processor threads detected less one or two.398 */399 size_t perpkt_threads;400 401 /**402 * See diagrams, this sets the maximum size of buffers used between403 * the single hasher thread and the buffer.404 * NOTE setting this to less than recommend could cause deadlock a405 * trace that manages its own packets.406 * A unblockable warning message will be printed to stderr in this case.407 */408 /** The number of packets that can queue per thread from hasher thread */409 size_t hasher_queue_size;410 411 /**412 * If true use a polling hasher queue, that means that we will spin/or yeild413 * when rather than blocking on a lock. This applies to both the hasher thread414 * and perpkts reading the queues.415 */416 bool hasher_polling;417 418 /**419 * If true the reporter thread will continuously poll waiting for results420 * if false they are only checked when a message is received, this message421 * is controlled by reporter_thold.422 */423 bool reporter_polling;424 425 /**426 * Perpkt thread result queue size before triggering the reporter step to read results427 */428 size_t reporter_thold;429 430 /**431 * Prints a line to standard error for every state change432 * for both the trace as a whole and for each thread.433 */434 bool debug_state;435 };436 437 314 /** 438 315 * The methods we use to combine multiple outputs into a single output 439 316 * This is not considered a stable API however is public. 440 * Where possible use built in combiners 441 * 442 * NOTEthis structure is duplicated per trace and as such can317 * Where possible use built in combiners. 318 * 319 * @note this structure is duplicated per trace and as such can 443 320 * have functions rewritten, and in fact should if possible. 444 321 */ … … 447 324 448 325 /** 449 * Called at the start of the trace to allow data structures450 * to be initi lised and allow functions to be swapped if approriate.326 * Called at the start of the trace to allow data-structures 327 * to be initialised and allow functions to be swapped if appropriate. 451 328 * 452 329 * Also factors such as whether the trace is live or not can … … 474 351 /** 475 352 * Read as many results as possible from the trace. 476 * Direct y calls the users code to handle results from here.353 * Directly calls the users code to handle results from here. 477 354 * 478 355 * THIS SHOULD BE NON-BLOCKING AND READ AS MANY AS POSSIBLE … … 512 389 513 390 /** 514 * Configuration options, what this does is up to the combiner391 * Configuration options, what this does is up to the combiner 515 392 * chosen. 516 393 */ … … 574 451 * 575 452 * @param libtrace The input trace to start 576 * @param global_blob Global data related to this trace access able using trace_get_global()453 * @param global_blob Global data related to this trace accessible using trace_get_global() 577 454 * @param per_pkt A user supplied function called when a packet is ready 578 455 * @param reporter A user supplied function called when a result is ready. 579 456 * Optional if NULL the reporter thread will not be started. 580 * @return 0 on success, otherwise -1 to indicate an error has occur ed457 * @return 0 on success, otherwise -1 to indicate an error has occurred 581 458 * 582 459 * This can also be used to restart an existing parallel trace, … … 592 469 * 593 470 * @param libtrace The parallel trace to be paused 594 * @return 0 on success, otherwise -1 to indicate an error has occur ed471 * @return 0 on success, otherwise -1 to indicate an error has occurred 595 472 * 596 473 */ … … 598 475 599 476 /** Stops a parallel trace, causing all threads to exit as if an EOF 600 * has occur ed. This replaces trace_interrupt(), allowing477 * has occurred. This replaces trace_interrupt(), allowing 601 478 * a specified trace to be stopped. 602 479 * 603 480 * @param libtrace The parallel trace to be stopped 604 * @return 0 on success, otherwise -1 to indicate an error has occur ed481 * @return 0 on success, otherwise -1 to indicate an error has occurred 605 482 * 606 483 * This should only be called by the main thread. … … 614 491 * 615 492 * Waits for a trace to finish, whether this be due to 616 * an error occur ing, an EOF or trace_pstop.493 * an error occurring, an EOF or trace_pstop. 617 494 * 618 495 */ … … 622 499 * @name User Data Storage 623 500 * 624 * These method provide a way for users to store data agai st a trace or501 * These method provide a way for users to store data against a trace or 625 502 * a thread. 626 503 * 627 504 * Alternatively one could use global variables and thread local 628 * storage (__thread), respectively, which in many cases could be simpl ier.505 * storage (__thread), respectively, which in many cases could be simpler. 629 506 * 630 507 * @note We do not lock on reads, instead we rely on the … … 645 522 * 646 523 * @param trace The parallel trace. 647 * @param data The new value to save agai snt the trace524 * @param data The new value to save against the trace 648 525 * @return The previously stored value 649 526 * … … 666 543 * 667 544 * @param The parallel trace. 668 * @param data The new value to save agai snt the trace545 * @param data The new value to save against the trace 669 546 * @return The previously stored value 670 547 * 671 * This function is not thread-safe and is inten ted only to be548 * This function is not thread-safe and is intended only to be 672 549 * called on the currently running thread. 673 550 */ … … 675 552 676 553 /// @} 554 555 556 /** 557 * @name Parallel Configuration 558 * 559 * These methods provide a way to configure the parallel libtrace library. 560 * 561 * Many of these options are typically unneeded by most applications as they 562 * control tuning aspects of the library and are more useful to the 563 * end user. 564 * 565 * To allow the end user to change this configuration libtrace will search for 566 * three environment variables and apply them to the configuration in the 567 * following order. Such that the first has the lowest priority. 568 * 569 * 1. LIBTRACE_CONF, The global environment configuration 570 * 2. LIBTRACE_CONF_<FORMAT>, Applied to a given format 571 * 3. LIBTRACE_CONF_<FORMAT_URI>, Applied the specified trace 572 * 573 * E.g. 574 * - int:eth0 would match LIBTRACE_CONF, LIBTRACE_CONF_INT, LIBTRACE_CONF_INT_ETH0 575 * - dag:/dev/dag0,0 would match LIBTRACE_CONF, LIBTRACE_CONF_DAG, LIBTRACE_CONF_DAG__DEV_DAG0_0 576 * - test.erf would match LIBTRACE_CONF, LIBTRACE_CONF_ERF, LIBTRACE_CONF_ERF_TEST_ERF 577 * 578 * @note All environment variables names MUST only contain 579 * [A-Z], [0-9] and [_] (underscore). Any characters 580 * outside of this range should be capitalised if possible or replaced with an 581 * underscore. 582 * @{ 583 */ 584 585 /** Set the maximum number of perpkt threads to use in a trace. 586 * 587 * @param[in] trace The parallel input trace 588 * @param[in] nb The number of threads to use. If 0 use default. 589 * @return 0 if successful otherwise -1 590 */ 591 DLLEXPORT int trace_set_perpkt_threads(libtrace_t *trace, int nb); 592 593 /** Set the interval between tick messages in milliseconds. 594 * 595 * @param[in] trace The parallel input trace 596 * @param[in] interval The interval in milliseconds. If 0 this is disabled [default]. 597 * @return 0 if successful otherwise -1 598 * 599 * When a underlying parallel live trace is used MESSAGE_TICK_INTERVAL is sent 600 * every tick interval to all per-packet threads to ensure data is received. 601 * This allows results to be printed even in cases flows are not being directed 602 * to a per-packet thread, while still maintaining order etc. 603 * 604 * @note Tick count is preferred over tick interval and will be used rather 605 * than tick interval if possible. 606 * @see MESSAGE_TICK_INTERVAL, trace_set_tick_count() 607 */ 608 DLLEXPORT int trace_set_tick_interval(libtrace_t *trace, size_t interval); 609 610 /** Set the count between tick messages. 611 * 612 * @param[in] trace The parallel input trace 613 * @param[in] count The tick count. If 0 this is disabled [default]. 614 * @return 0 if successful otherwise -1 615 * 616 * When an underlying trace is accessed internally by libtrace in a 617 * single-threaded manner MESSAGE_TICK_COUNT is sent to all per-packet threads 618 * after every count packets have been seen in the trace. This allows results 619 * to be printed even in cases flows are not being directed to a per-packet 620 * thread, while still maintaining order etc. 621 * 622 * @see MESSAGE_TICK_COUNT, trace_set_tick_interval() 623 */ 624 DLLEXPORT int trace_set_tick_count(libtrace_t *trace, size_t count); 625 626 /** 627 * Delays packets so they are played back in trace-time rather than as fast 628 * as possible (real-time). 629 * 630 * @param A parallel input trace 631 * @param tracetime If true packets are released with time intervals matching 632 * the original trace. Otherwise packets are read as fast as possible. 633 * @return 0 if successful otherwise -1 634 */ 635 DLLEXPORT int trace_set_tracetime(libtrace_t *trace, bool tracetime); 636 637 /** This sets the maximum size of the freelist used to store empty packets 638 * and their memory buffers. 639 * 640 * @param trace A parallel input trace 641 * @param size The number of empty packets to cache in memory. Set to the 642 * default, 0, to autoconfigure this value. 643 * @return 0 if successful otherwise -1 644 * 645 * Internally libtrace maintains a buffer of packet structures, this buffer 646 * includes a cache per thread and a shared main pool. This configures 647 * the size of the main pool. If an application is not passing packets 648 * through to the reducer step --- that is to say returns packets from 649 * the perpkt function --- this buffer will not need to be used. 650 * 651 * @note Setting this too low could cause performance issues or a deadlock. An 652 * unblockable warning will be printed. 653 * 654 * @see trace_set_thread_cache_size(), trace_set_fixed_count() 655 */ 656 DLLEXPORT int trace_set_cache_size(libtrace_t *trace, size_t size); 657 658 /** This sets the maximum size of the freelist thread cache's used to provide 659 * faster access than the main shared pool. 660 * 661 * @param trace A parallel input trace 662 * @param size The number of empty packets to cache in memory. Set to the 663 * default, 0, to autoconfigure this value. 664 * @return 0 if successful otherwise -1 665 * 666 * @see trace_set_cache_size(), trace_set_fixed_count() 667 */ 668 DLLEXPORT int trace_set_thread_cache_size(libtrace_t *trace, size_t size); 669 670 /** If true the total number of packets that can be created by a trace is limited 671 * to that set by trace_set_cache_size(), otherwise once exceeded malloc 672 * and free will be used to create and free packets, this will be slower than 673 * using the freelist and could run a machine out of memory. 674 * 675 * @param trace A parallel input trace 676 * @param fixed If true the total number of packets is limited, otherwise 677 * it is not. Defaults to false. 678 * @return 0 if successful otherwise -1 679 * 680 * @see trace_set_thread_cache_size(), trace_set_cache_size() 681 */ 682 DLLEXPORT int trace_set_fixed_count(libtrace_t *trace, bool fixed); 683 684 /** The number of packets to batch together for processing internally 685 * by libtrace. 686 * 687 * @param trace A parallel input trace 688 * @param size The total number of packets to batch together. Set to the 689 * default, 0, to autoconfigure this value. 690 * @return 0 if successful otherwise -1 691 * 692 * Internally libtrace will attempt to read up to this number of packets from 693 * a format typically values of 10 will get good performance and increasing 694 * beyond that will should little difference. 695 * 696 * @note We still pass a single packet at a time to the perpkt function 697 */ 698 DLLEXPORT int trace_set_burst_size(libtrace_t *trace, size_t size); 699 700 /** 701 * See diagrams, this sets the maximum size of buffers used between 702 * the single hasher thread and the buffer. 703 * NOTE setting this to less than recommend could cause deadlock a 704 * trace that manages its own packets. 705 * A unblockable warning message will be printed to stderr in this case. 706 */ 707 /** The number of packets that can queue per thread from hasher thread */ 708 DLLEXPORT int trace_set_hasher_queue_size(libtrace_t *trace, size_t size); 709 710 /** If true use a polling hasher queue, that means that we will spin/or yield 711 * when data is not available rather than blocking on a condition. 712 * 713 * @param trace A parallel input trace 714 * @param polling If true the hasher will poll waiting for data, otherwise 715 * it is not. Defaults to false. 716 * 717 * We note this is likely to waste many CPU cycles and could even decrease 718 * performance. 719 * 720 * @return 0 if successful otherwise -1 721 */ 722 DLLEXPORT int trace_set_hasher_polling(libtrace_t *trace, bool polling); 723 724 /** If true the reporter thread will continuously poll waiting for results 725 * if false they are only checked when a message is received, this message 726 * is controlled by reporter_thold. 727 * 728 * @param trace A parallel input trace 729 * @param polling If true the reporter will poll waiting for data, otherwise 730 * it is not. Defaults to false. 731 * @return 0 if successful otherwise -1 732 * 733 * We note this is likely to waste many CPU cycles and could even decrease 734 * performance. 735 * 736 * @note This setting could be ignored by some reporters. 737 */ 738 DLLEXPORT int trace_set_reporter_polling(libtrace_t *trace, bool polling); 739 740 /** Set the perpkt thread result queue size before triggering the reporter 741 * to read results. 742 * 743 * @param trace A parallel input trace 744 * @param thold The threshold on the number of results to enqueue before 745 * notifying the reporter thread to read them. 746 * @return 0 if successful otherwise -1 747 * 748 * 749 * @note This setting is generally ignored if trace_set_reporter_polling() is 750 * set however some combiner functions might ignore trace_set_reporter_polling() 751 * and still require this to be set. 752 * @see trace_publish_result(), trace_post_reporter() 753 */ 754 DLLEXPORT int trace_set_reporter_thold(libtrace_t *trace, size_t thold); 755 756 /** Prints a line to standard error for every state change 757 * for both the trace as a whole and for each thread. 758 * 759 * @param trace A parallel input trace 760 * @param debug_state If true debug is printed. Defaults false. 761 * @return 0 if successful otherwise -1. 762 * 763 */ 764 DLLEXPORT int trace_set_debug_state(libtrace_t *trace, bool debug_state); 677 765 678 766 /** Set the hasher function for a parallel trace. … … 699 787 * preferred over the default supplied by libtrace. 700 788 * 701 * @note When supplying a hasher function it should be thread-safe as it could789 * @note When supplying a hasher function it should be thread-safe so it can 702 790 * be run in parallel by libtrace. Ideally this should rely upon no state, other 703 791 * than some form of seed value supplied in data. 704 792 */ 705 DLLEXPORT int trace_set_hasher(libtrace_t *trace, enum hasher_types type, fn_hasher hasher, void *data); 793 DLLEXPORT int trace_set_hasher(libtrace_t *trace, enum hasher_types type, 794 fn_hasher hasher, void *data); 795 796 /// @} 797 706 798 707 799 /** Types of results. … … 724 816 /** The result is a tick message 725 817 * 726 * @param key The erf time stamp of the tick818 * @param key The erf time-stamp of the tick 727 819 */ 728 820 RESULT_TICK_INTERVAL, … … 743 835 /** Publish a result for to the combiner destined for the reporter thread 744 836 * 745 * @param libtrace[in]The parallel input trace746 * @param t[in]The current per-packet thread747 * @param key[in]The key of the result (used for sorting by the combiner)748 * @param value[in]The value of the result749 * @param type[in]The type of result see the documentation for the result_types enum837 * @param[in] libtrace The parallel input trace 838 * @param[in] t The current per-packet thread 839 * @param[in] key The key of the result (used for sorting by the combiner) 840 * @param[in] value The value of the result 841 * @param[in] type The type of result see the documentation for the result_types enum 750 842 */ 751 843 DLLEXPORT void trace_publish_result(libtrace_t *libtrace, … … 797 889 * @param[in] t The thread to check, if NULL the current thread will be used [Optional] 798 890 * @param[out] message A pointer to libtrace_message_t structure which will be 799 * filled with the retri ved message.891 * filled with the retrieved message. 800 892 * 801 893 * @return The number of messages remaining otherwise -1 upon error. … … 814 906 * @param[in] t The thread to check, if NULL the current thread will be used [Optional] 815 907 * @param[out] message A pointer to libtrace_message_t structure which will be 816 * filled with the retri ved message.908 * filled with the retrieved message. 817 909 * 818 910 * @return 0 if successful otherwise -1 upon error or if no packets were available. … … 923 1015 * 924 1016 * @param[in] libtrace the parallel input trace 925 * @param[in] t Either a per packet thread or NULL to retri ve the first packet1017 * @param[in] t Either a per packet thread or NULL to retrieve the first packet 926 1018 * of across all per packet threads. 927 1019 * @param[out] packet A pointer to the first packet in the trace. [Optional] 928 * @param[out] tv The system time stamp when this packet was received. [Optional]1020 * @param[out] tv The system time-stamp when this packet was received. [Optional] 929 1021 * @return 1 if we are confident this is the first packet. Otherwise 0 if this 930 1022 * is a best guess (this is only possible int the case t=NULL) … … 940 1032 struct timeval **tv); 941 1033 942 /** Makes a packet safe, a packet will become inva ild after a1034 /** Makes a packet safe, a packet will become invalid after a 943 1035 * pausing a trace. 944 1036 * 945 * @param pkt[in,out]The packet to make safe1037 * @param[in,out] pkt The packet to make safe 946 1038 * 947 1039 * This copies a packet in such a way that it will be able to survive a pause. … … 953 1045 /** Makes a result safe if a result contains a packet. 954 1046 * 955 * @param res[in,out]The result to make safe.1047 * @param[in,out] res The result to make safe. 956 1048 * 957 1049 * This ensures the internal content of a result is safe to survive a pause. … … 960 1052 DLLEXPORT void libtrace_make_result_safe(libtrace_result_t *res); 961 1053 962 963 DLLEXPORT int trace_parallel_config(libtrace_t *libtrace, trace_parallel_option_t option, void *value);964 965 1054 /** In a parallel trace, free a packet back to libtrace. 966 1055 * … … 976 1065 977 1066 DLLEXPORT libtrace_info_t *trace_get_information(libtrace_t * libtrace); 978 DLLEXPORT void parse_user_config(struct user_configuration* uc, char * str); 979 DLLEXPORT void parse_user_config_file(struct user_configuration* uc, FILE *file); 980 DLLEXPORT int libtrace_get_perpkt_count(libtrace_t* t); 1067 1068 /** Sets the configuration of a trace based upon a comma separated list of 1069 * key value pairs. 1070 * 1071 * @param trace A parallel trace which is not running or destroyed 1072 * @param str A comma separated list of key=value pairs. 1073 * E.g. \em "burst_size=20,perpkt_threads=2,fixed_count=true" 1074 * @return 0 if successful otherwise -1. If bad options are passed we will 1075 * print the error to stderr but still return successful. 1076 * 1077 * List of keys: 1078 * * \b cache_size,\b cs see trace_set_cache_size() [size_t] 1079 * * \b thread_cache_size,\b tcs see trace_set_thread_cache_size() [size_t] 1080 * * \b fixed_count,\b fc see trace_set_fixed_count() [bool] 1081 * * \b burst_size,\b bs see trace_set_burst_size() [size_t] 1082 * * \b tick_interval,\b ti see trace_set_tick_interval() [size_t] 1083 * * \b tick_count,\b tc see trace_set_tick_count() [size_t] 1084 * * \b perpkt_threads,\b pt see trace_set_perpkt_threads() [XXX TBA XXX] 1085 * * \b hasher_queue_size,\b hqs see trace_set_hasher_queue_size() [size_t] 1086 * * \b hasher_polling,\b hp see trace_set_hasher_polling() [bool] 1087 * * \b reporter_polling,\b rp see trace_set_reporter_polling() [bool] 1088 * * \b reporter_thold,\b rt see trace_set_reporter_thold() [size_t] 1089 * * \b debug_state,\b ds see trace_set_debug_state() [bool] 1090 * 1091 * Booleans can be set as 0/1 or false/true. 1092 * 1093 * @note a environment variable interface is provided by default to users via 1094 * LIBTRACE_CONFIG, see Parallel Configuration for more information. 1095 * 1096 * @note this interface is provided to allow a user to configure an application 1097 * if a libtrace applicate wishes to configure a setting it should use a 1098 * trace_set_*() function with the same name. 1099 */ 1100 DLLEXPORT int trace_set_configuration(libtrace_t *trace, const char * str); 1101 1102 /** Sets configuration from a file. This reads every line from the file and 1103 * interprets each line with trace_set_configuration(). 1104 * 1105 * @param trace A parallel trace which is not running or destroyed 1106 * @param file A file pointer which we read each line from 1107 * @return 0 if successful otherwise -1. If bad options are passed we will 1108 * print the error to stderr but still return successful. 1109 * 1110 * @note We do not close the file pointer upon completion 1111 */ 1112 DLLEXPORT int trace_set_configuration_file(libtrace_t *trace, FILE *file); 1113 1114 DLLEXPORT int libtrace_get_perpkt_count(libtrace_t* t); // TODO MATCH WITH THE SET_PERPKT 981 1115 982 1116 /** … … 992 1126 DLLEXPORT void trace_set_combiner(libtrace_t *trace, const libtrace_combine_t *combiner, libtrace_generic_t config); 993 1127 994 #define ZERO_USER_CONFIG(config) memset(&config, 0, sizeof(struct user_configuration));995 996 1128 #endif // LIBTRACE_PARALLEL_H
Note: See TracChangeset
for help on using the changeset viewer.