aboutsummaryrefslogtreecommitdiffstats
path: root/src/vcl/vcl_bapi.c
AgeCommit message (Expand)AuthorFilesLines
2019-02-05sock api: allow to start client with no rx_threadTomasz Kulasek1-1/+1
2019-01-30vls: support passive listenersFlorin Coras1-2/+1
2019-01-05vcl/session: add api for changing session app workerFlorin Coras1-15/+0
2019-01-04Add TLS support for VCLPing Yu1-0/+64
2018-12-13tcp: validate seq for handshake ackFlorin Coras1-0/+1
2018-12-04vcl: cleanup children that use _exit()Florin Coras1-8/+29
2018-12-04vcl: test refactor and improvementsFlorin Coras1-4/+4
2018-12-03svm: use explicit svm fifo segment main for slavesFlorin Coras1-3/+4
2018-11-30vcl: wait for segments with segment handleFlorin Coras1-26/+66
2018-11-30session: segment handle in accept/connect notificationsFlorin Coras1-1/+2
2018-11-29vcl: basic support for apps that forkFlorin Coras1-20/+26
2018-11-21session: cleanup use of api_client_indexFlorin Coras1-1/+2
2018-11-18vcl/session: apps with process workersFlorin Coras1-21/+17
2018-11-14Remove c-11 memcpy checks from perf-critical codeDave Barach1-5/+5
2018-09-08vcl: set worker pthread stop keyFlorin Coras1-0/+3
2018-09-07vcl: refactor test client to support workersFlorin Coras1-2/+3
2018-09-06session: support multiple worker bindsFlorin Coras1-12/+31
2018-08-30vcl: add support for multi-worker appsFlorin Coras1-15/+99
2018-08-28vcl/session: use mq for bind repliesFlorin Coras1-53/+5
2018-08-25vcl: remove unused binary api handlersFlorin Coras1-285/+0
2018-08-24session: add support for multiple app workersFlorin Coras1-1/+1
2018-08-10vcl: support for eventfd mq signalingFlorin Coras1-61/+147
2018-07-31vcl: add read/write udp supportFlorin Coras1-0/+14
2018-07-27vcl: use events for epoll/select/read/writeFlorin Coras1-6/+6
2018-07-17session: use msg queue for eventsFlorin Coras1-3/+3
2018-06-28vcl: move binary api and cfg to separate filesFlorin Coras1-0/+731
mpcap_packet_type_t; #define foreach_mpcap_file_header \ /** 0xa1b2c3d4 host byte order. \ 0xd4c3b2a1 => need to byte swap everything. */ \ _ (u32, magic) \ \ /** Currently major 2 minor 4. */ \ _ (u16, major_version) \ _ (u16, minor_version) \ \ /** 0 for GMT. */ \ _ (u32, time_zone) \ \ /** Accuracy of timestamps. Typically set to 0. */ \ _ (u32, sigfigs) \ \ /** Size of largest packet in file. */ \ _ (u32, max_packet_size_in_bytes) \ \ /** One of vnet_mpcap_packet_type_t. */ \ _ (u32, packet_type) /** File header struct */ typedef struct { #define _(t, f) t f; foreach_mpcap_file_header #undef _ } mpcap_file_header_t; #define foreach_mpcap_packet_header \ /** Time stamp in seconds */ \ _ (u32, time_in_sec) \ /** Time stamp in microseconds. */ \ _ (u32, time_in_usec) \ \ /** Number of bytes stored in file. */ \ _ (u32, n_packet_bytes_stored_in_file) \ /** Number of bytes in actual packet. */ \ _ (u32, n_bytes_in_packet) /** Packet header. */ typedef struct { #define _(t, f) t f; foreach_mpcap_packet_header #undef _ /** Packet data follows. */ u8 data[0]; } mpcap_packet_header_t; /** * @brief MPCAP main state data structure */ typedef struct { /** File name of mpcap output. */ char *file_name; /** spinlock, initialized if flagged MPCAP_FLAG_THREAD_SAFE */ clib_spinlock_t lock; /** Number of packets to capture. */ u32 n_packets_to_capture; /** Packet type */ mpcap_packet_type_t packet_type; /** Maximum file size */ u64 max_file_size; /** Base address */ u8 *file_baseva; /** current memory address */ u8 *current_va; /** Number of packets currently captured. */ u32 n_packets_captured; /** Pointer to file header in svm, for ease of updating */ mpcap_file_header_t *file_header; /** flags */ u32 flags; #define MPCAP_FLAG_INIT_DONE (1 << 0) #define MPCAP_FLAG_THREAD_SAFE (1 << 1) #define MPCAP_FLAG_WRITE_ENABLE (1 << 2) /** Bytes written */ u32 n_mpcap_data_written; /** Vector of mpcap data. */ u8 *mpcap_data; /** Packets in mapped mpcap file. */ u64 packets_read; /** Min/Max Packet bytes */ u32 min_packet_bytes, max_packet_bytes; } mpcap_main_t; /* Some sensible default size */ #define MPCAP_DEFAULT_FILE_SIZE (10<<20) /** initialize a mpcap file (for writing) */ clib_error_t *mpcap_init (mpcap_main_t * pm); /** Flush / unmap a mpcap file */ clib_error_t *mpcap_close (mpcap_main_t * pm); /** mmap a mpcap data file. */ clib_error_t *mpcap_map (mpcap_main_t * pm); #endif /* included_vppinfra_mpcap_h */ /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */