- Timestamp:
- 04/21/05 09:54:40 (17 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:
- 4b30586
- Parents:
- 7bb7dda
- Location:
- lib
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/Makefile.am
r3cfa94a r808a478 4 4 #libtrace_la_SOURCES = trace.c fifo.c fifo.h common.h dagapi.c dagopts.c 5 5 #else 6 libtrace_la_SOURCES = trace.c fifo.c fifo.h common.h 6 libtrace_la_SOURCES = trace.c fifo.c fifo.h common.h 7 7 #endif 8 8 libtrace_la_CFLAGS = @ADD_INCLS@ 9 libtrace_la_LIBADD = @ADD_LIBS@ $(top_builddir)/replace/libreplace.a9 libtrace_la_LIBADD = @ADD_LIBS@ @LTLIBOBJS@ 10 10 libtrace_la_LDFLAGS=-version-info 2:16:0 @ADD_LDFLAGS@ 11 11 -
lib/trace.c
r7bb7dda r808a478 64 64 #include <sys/mman.h> 65 65 #include <unistd.h> 66 #include <net/ethernet.h> 66 67 #ifdef HAVE_NET_IF_ARP_H 68 # include <net/if_arp.h> 69 #endif 70 71 #ifdef HAVE_NET_IF_H 72 # include <net/if.h> 73 #endif 74 75 #ifdef HAVE_NETINET_IN_H 76 # include <netinet/in.h> 77 #endif 78 79 #ifdef HAVE_NET_ETHERNET_H 80 # include <net/ethernet.h> 81 #endif 82 83 #ifdef HAVE_NETINET_IF_ETHER_H 84 # include <netinet/if_ether.h> 85 #endif 86 67 87 #include <time.h> 68 88 #include <sys/ioctl.h> … … 93 113 #if HAVE_PCAP_H 94 114 # include <pcap.h> 115 # ifdef HAVE_PCAP_INT_H 116 # include <pcap-int.h> 117 # endif 95 118 #endif 96 119 … … 894 917 assert(0); 895 918 } 896 return ethptr;919 return (void *)ethptr; 897 920 } 898 921 … … 1222 1245 case PCAP: 1223 1246 pcapptr = (struct pcap_pkthdr *)packet->buffer; 1224 tv = pcapptr->ts; 1247 // ick. FIXME 1248 tv.tv_sec = pcapptr->ts.tv_sec; 1249 tv.tv_usec = pcapptr->ts.tv_usec; 1225 1250 break; 1226 1251 #endif … … 1616 1641 switch (trace_get_link_type(packet)) { 1617 1642 case TRACE_TYPE_ETH: 1618 pcap = pcap_open_dead(DLT_EN10MB, 1500);1643 pcap = (pcap_t *)pcap_open_dead(DLT_EN10MB, 1500); 1619 1644 break; 1645 #ifdef DLT_LINUX_SLL 1620 1646 case TRACE_TYPE_LINUX_SLL: 1621 1647 pcap = pcap_open_dead(DLT_LINUX_SLL, 1500); 1622 1648 break; 1649 #endif 1623 1650 default: 1624 1651 printf("only works for ETH and LINUX_SLL (ppp) at the moment\n");
Note: See TracChangeset
for help on using the changeset viewer.