Changeset 23971d0
- Timestamp:
- 04/08/06 16:23:04 (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:
- 33e1501
- Parents:
- 9ee7134
- Location:
- lib
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/dagformat.h
r9de8150 r23971d0 45 45 unsigned int dserror:1; 46 46 unsigned int pad:2; 47 } __attribute__((packed))flags_t;47 } PACKED flags_t; 48 48 49 49 /** GPP Global type */ … … 61 61 aal5_rec_t aal5; 62 62 } rec; 63 } __attribute__((packed))dag_record_t;63 } PACKED dag_record_t; 64 64 65 65 /** Dynamic(?) Universal Clock Kit Information packet */ -
lib/daglegacy.h
r3b8a5ef r23971d0 5 5 uint64_t ts; 6 6 uint32_t crc; 7 } __attribute__ ((packed))legacy_cell_t;7 } PACKED legacy_cell_t; 8 8 9 9 typedef struct legacy_ether { 10 10 uint64_t ts; 11 11 uint16_t wlen; 12 } __attribute__ ((packed))legacy_ether_t;12 } PACKED legacy_ether_t; 13 13 14 14 typedef struct legacy_pos { … … 16 16 uint32_t slen; 17 17 uint32_t wlen; 18 } __attribute__ ((packed))legacy_pos_t;18 } PACKED legacy_pos_t; 19 19 20 20 #endif -
lib/format_erf.c
r6b2d5ed r23971d0 37 37 #include "parse_cmd.h" 38 38 39 #ifdef HAVE_INTTYPES_H40 # include <inttypes.h>41 #else42 # error "Can't find inttypes.h - this needs to be fixed"43 #endif44 45 #ifdef HAVE_STDDEF_H46 # include <stddef.h>47 #else48 # error "Can't find stddef.h - do you define ptrdiff_t elsewhere?"49 #endif50 #include <sys/types.h>51 #include <sys/socket.h>52 #include <sys/un.h>53 #include <sys/mman.h>54 #include <sys/stat.h>55 #include <unistd.h>56 39 #include <assert.h> 57 40 #include <errno.h> 58 #include <netdb.h>59 41 #include <fcntl.h> 60 42 #include <stdio.h> 61 43 #include <string.h> 62 44 #include <stdlib.h> 45 46 #ifdef WIN32 47 # include <io.h> 48 # include <share.h> 49 # define PATH_MAX _MAX_PATH 50 # define snprintf sprintf_s 51 #else 52 # include <netdb.h> 53 #endif 63 54 64 55 … … 373 364 remote.sin_port = htons(CONNINFO.rt.port); 374 365 remote.sin_addr = *((struct in_addr *)he->h_addr); 375 bzero(&(remote.sin_zero), 8);366 memset(&(remote.sin_zero), 0, 8); 376 367 377 368 if (connect(INPUT.fd, (struct sockaddr *)&remote, … … 1014 1005 }; 1015 1006 1016 void __attribute__((constructor))erf_constructor() {1007 void CONSTRUCTOR erf_constructor() { 1017 1008 register_format(&rtclient); 1018 1009 register_format(&erf); -
lib/format_helper.c
r6b2d5ed r23971d0 39 39 #include <string.h> 40 40 #include <errno.h> 41 #ifdef HAVE_INTTYPES_H42 # include <inttypes.h>43 #else44 # error "Can't find inttypes.h - this needs to be fixed"45 #endif46 41 #include "format_helper.h" 47 42 … … 49 44 #include <assert.h> 50 45 #include <stdarg.h> 46 47 #ifdef WIN32 48 # include <io.h> 49 # include <share.h> 50 # define snprintf sprintf_s 51 52 struct libtrace_eventobj_t trace_event_device(struct libtrace_t *trace, struct libtrace_packet_t *packet) { 53 struct libtrace_eventobj_t event = {0,0,0.0,0}; 54 55 trace_set_err(trace,TRACE_ERR_OPTION_UNAVAIL, "trace_event() is not " 56 "supported on devices under windows in this version"); 57 58 event.type = TRACE_EVENT_TERMINATE; 59 return event; 60 } 61 #else 62 # include <sys/ioctl.h> 51 63 52 64 struct libtrace_eventobj_t trace_event_device(struct libtrace_t *trace, struct libtrace_packet_t *packet) { … … 75 87 return event; 76 88 } 89 #endif 77 90 78 91 struct libtrace_eventobj_t trace_event_trace(struct libtrace_t *trace, struct libtrace_packet_t *packet) { -
lib/libtrace.h
r67a14d4 r23971d0 73 73 # define UNUSED __attribute__((unused)) 74 74 # define PACKED __attribute__((packed)) 75 # define CONSTRUCTOR __attribute__((constructor)) 75 76 #else 76 77 # define SIMPLE_FUNCTION 77 78 # define UNUSED 79 # define PACKED 80 # define CONSTRUCTOR 78 81 #endif 79 82
Note: See TracChangeset
for help on using the changeset viewer.