Changeset dfef05d
- Timestamp:
- 08/12/04 14:34:54 (18 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:
- a4ce365
- Parents:
- 476df56
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
ChangeLog
rffe76f8 rdfef05d 3 3 ## 4 4 ## Copyright (c) 2004 The University of Waikato, Hamilton, New Zealand. 5 ## Authors: Daniel Lawson 6 ## Perry Lorier 5 ## Authors: Daniel Lawson, WAND Group 6 ## Perry Lorier, WAND Group 7 7 ## 8 8 ## All rights reserved. -
config.h
rac50951 rdfef05d 39 39 #define HAVE_PCAP_H 1 40 40 41 /* Define if you have the <stddef.h> header file. */ 42 #define HAVE_STDDEF_H 1 43 44 /* Define if you have the <stdint.h> header file. */ 45 #define HAVE_STDINT_H 1 46 41 47 /* Define if you have the <sys/limits.h> header file. */ 42 48 /* #undef HAVE_SYS_LIMITS_H */ -
config.h.in
rffe76f8 rdfef05d 38 38 #undef HAVE_PCAP_H 39 39 40 /* Define if you have the <stddef.h> header file. */ 41 #undef HAVE_STDDEF_H 42 43 /* Define if you have the <stdint.h> header file. */ 44 #undef HAVE_STDINT_H 45 40 46 /* Define if you have the <sys/limits.h> header file. */ 41 47 #undef HAVE_SYS_LIMITS_H -
configure
rffe76f8 rdfef05d 7480 7480 7481 7481 7482 for ac_header in pcap.h zlib.h pcap-bpf.h net/bpf.h sys/limits.h 7482 7483 7484 for ac_header in pcap.h zlib.h pcap-bpf.h net/bpf.h sys/limits.h stddef.h stdint.h 7483 7485 do 7484 7486 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -
configure.in
rffe76f8 rdfef05d 20 20 AC_HEADER_STDC 21 21 dnl AC_CHECK_HEADERS(errno.h stdlib.h stdio.h assert.h string.h netinet/in.h assert.h errno.h fcntl.h net/ethernet.h netdb.h pcap.h stdio.h stdlib.h string.h sys/stat.h sys/types.h sys/socket.h sys/un.h unistd.h time.h sys/ioctl.h net/bpf.h pcap.h zlib.h pcap-bpf.h) 22 AC_CHECK_HEADERS(pcap.h zlib.h pcap-bpf.h net/bpf.h sys/limits.h )22 AC_CHECK_HEADERS(pcap.h zlib.h pcap-bpf.h net/bpf.h sys/limits.h stddef.h stdint.h) 23 23 24 24 dnl Checks for typedefs, structures, and compiler characteristics. -
lib/fifo.c
r60fc8aa rdfef05d 37 37 #include <string.h> /* bzero */ 38 38 #include "fifo.h" 39 40 #include <stdint.h> 41 #ifdef HAVE_STDDEF_H 42 #include <stddef.h> 43 #else 44 # error "Can't find stddef.h - do you define ptrdiff_t elsewhere" 45 #endif 39 46 40 47 #include <netinet/in.h> … … 205 212 size = MIN( ( fifo->length - fifo->datamap[which]), lenleft); 206 213 memcpy(buffer, 207 (char *)(( int)fifo->base + fifo->datamap[which]),214 (char *)((ptrdiff_t)fifo->base + fifo->datamap[which]), 208 215 size); 209 216 increment_pointer(fifo,which,size); … … 232 239 while (lenleft > 0) { 233 240 size = MIN((fifo->length - fifo->datamap[IN]), lenleft ); 234 memcpy((char *)(( int)fifo->base + fifo->datamap[IN]),241 memcpy((char *)((ptrdiff_t)fifo->base + fifo->datamap[IN]), 235 242 buffer, 236 243 size); -
lib/trace.c
r476df56 rdfef05d 60 60 #include <time.h> 61 61 #include <sys/ioctl.h> 62 63 #include <stdint.h> 64 #ifdef HAVE_STDDEF_H 65 #include <stddef.h> 66 #else 67 # error "Can't find stddef.h - do you define ptrdiff_t elsewhere" 68 #endif 62 69 63 70 #include "libtrace.h" … … 690 697 } 691 698 if (ipptr->ip_p == 6) { 692 tcpptr = (struct libtrace_tcp *)(( int)ipptr + (ipptr->ip_hl * 4));699 tcpptr = (struct libtrace_tcp *)((ptrdiff_t)ipptr + (ipptr->ip_hl * 4)); 693 700 } 694 701 return tcpptr; … … 710 717 } 711 718 if (ipptr->ip_p == 17) { 712 udpptr = (struct libtrace_udp *)(( int)ipptr + (ipptr->ip_hl * 4));719 udpptr = (struct libtrace_udp *)((ptrdiff_t)ipptr + (ipptr->ip_hl * 4)); 713 720 } 714 721 return udpptr; … … 730 737 } 731 738 if (ipptr->ip_p == 1) { 732 icmpptr = (struct libtrace_icmp *)(( int)ipptr + (ipptr->ip_hl * 4));739 icmpptr = (struct libtrace_icmp *)((ptrdiff_t)ipptr + (ipptr->ip_hl * 4)); 733 740 } 734 741 return icmpptr;
Note: See TracChangeset
for help on using the changeset viewer.