Changeset 1f3696b for lib


Ignore:
Timestamp:
08/11/04 14:44:20 (17 years ago)
Author:
Daniel Lawson <dlawson@…>
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:
ffe76f8
Parents:
e619d90
Message:

Slight changes to code, basically #includes and #defines, and it should build cleanly on freebsd now.

Location:
lib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • lib/Makefile.in

    r7957e84 r1f3696b  
    5959host_triplet = @host@
    6060AMTAR = @AMTAR@
     61AR = @AR@
    6162AS = @AS@
    6263AWK = @AWK@
    6364CC = @CC@
     65CXX = @CXX@
     66CXXCPP = @CXXCPP@
    6467DEPDIR = @DEPDIR@
    6568DLLTOOL = @DLLTOOL@
    6669ECHO = @ECHO@
     70EGREP = @EGREP@
    6771EXEEXT = @EXEEXT@
     72F77 = @F77@
     73GCJ = @GCJ@
     74GCJFLAGS = @GCJFLAGS@
    6875INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
    6976LIBPCAP = @LIBPCAP@
     
    7784PACKAGE = @PACKAGE@
    7885RANLIB = @RANLIB@
     86RC = @RC@
    7987STRIP = @STRIP@
    8088VERSION = @VERSION@
     
    8593lib_LTLIBRARIES = libtrace.la
    8694libtrace_la_SOURCES = trace.c fifo.c fifo.h common.h
    87 lib_HEADERS = libtrace.h dagformat.h wag.h
     95include_HEADERS = libtrace.h dagformat.h wag.h
    8896libtrace_la_LIBADD = @LIBPCAP@ @LIBZ@
    8997libtrace_la_LDFLAGS = -version-info 2:0:0 @LIBPCAP_PATH@ @LIBZ_PATH@
     
    114122CFLAGS = @CFLAGS@
    115123DIST_SOURCES = $(libtrace_la_SOURCES)
    116 HEADERS = $(lib_HEADERS)
    117 
    118 DIST_COMMON = $(lib_HEADERS) Makefile.am Makefile.in
     124HEADERS = $(include_HEADERS)
     125
     126DIST_COMMON = $(include_HEADERS) Makefile.am Makefile.in
    119127SOURCES = $(libtrace_la_SOURCES)
    120128
     
    192200CCDEPMODE = @CCDEPMODE@
    193201uninstall-info-am:
    194 install-libHEADERS: $(lib_HEADERS)
     202install-includeHEADERS: $(include_HEADERS)
    195203        @$(NORMAL_INSTALL)
    196         $(mkinstalldirs) $(DESTDIR)$(libdir)
    197         @list='$(lib_HEADERS)'; for p in $$list; do \
     204        $(mkinstalldirs) $(DESTDIR)$(includedir)
     205        @list='$(include_HEADERS)'; for p in $$list; do \
    198206          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
    199207          f="`echo $$p | sed -e 's|^.*/||'`"; \
    200           echo " $(INSTALL_HEADER) $$d$$p $(DESTDIR)$(libdir)/$$f"; \
    201           $(INSTALL_HEADER) $$d$$p $(DESTDIR)$(libdir)/$$f; \
    202         done
    203 
    204 uninstall-libHEADERS:
     208          echo " $(INSTALL_HEADER) $$d$$p $(DESTDIR)$(includedir)/$$f"; \
     209          $(INSTALL_HEADER) $$d$$p $(DESTDIR)$(includedir)/$$f; \
     210        done
     211
     212uninstall-includeHEADERS:
    205213        @$(NORMAL_UNINSTALL)
    206         @list='$(lib_HEADERS)'; for p in $$list; do \
     214        @list='$(include_HEADERS)'; for p in $$list; do \
    207215          f="`echo $$p | sed -e 's|^.*/||'`"; \
    208           echo " rm -f $(DESTDIR)$(libdir)/$$f"; \
    209           rm -f $(DESTDIR)$(libdir)/$$f; \
     216          echo " rm -f $(DESTDIR)$(includedir)/$$f"; \
     217          rm -f $(DESTDIR)$(includedir)/$$f; \
    210218        done
    211219
     
    268276
    269277installdirs:
    270         $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(libdir)
     278        $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir)
    271279
    272280install: install-am
     
    311319info-am:
    312320
    313 install-data-am:
    314 
    315 install-exec-am: install-libHEADERS install-libLTLIBRARIES
     321install-data-am: install-includeHEADERS
     322
     323install-exec-am: install-libLTLIBRARIES
    316324
    317325install-info: install-info-am
     
    330338        mostlyclean-libtool
    331339
    332 uninstall-am: uninstall-info-am uninstall-libHEADERS \
     340uninstall-am: uninstall-includeHEADERS uninstall-info-am \
    333341        uninstall-libLTLIBRARIES
    334342
     
    338346        distclean-tags distdir dvi dvi-am info info-am install \
    339347        install-am install-data install-data-am install-exec \
    340         install-exec-am install-info install-info-am install-libHEADERS \
    341         install-libLTLIBRARIES install-man install-strip installcheck \
    342         installcheck-am installdirs maintainer-clean \
    343         maintainer-clean-generic mostlyclean mostlyclean-compile \
    344         mostlyclean-generic mostlyclean-libtool tags uninstall \
    345         uninstall-am uninstall-info-am uninstall-libHEADERS \
    346         uninstall-libLTLIBRARIES
     348        install-exec-am install-includeHEADERS install-info \
     349        install-info-am install-libLTLIBRARIES install-man \
     350        install-strip installcheck installcheck-am installdirs \
     351        maintainer-clean maintainer-clean-generic mostlyclean \
     352        mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
     353        tags uninstall uninstall-am uninstall-includeHEADERS \
     354        uninstall-info-am uninstall-libLTLIBRARIES
    347355
    348356# Tell versions [3.59,3.63) of GNU make to not export all variables.
  • lib/libtrace.h

    r2137b49 r1f3696b  
    3232#define LIBTRACE_H
    3333
    34 #include <features.h>
    3534#include <sys/types.h>
    3635#include <netinet/in.h>
     
    9190struct libtrace_ip
    9291  {
    93 #if __BYTE_ORDER == __LITTLE_ENDIAN
     92#if BYTE_ORDER == __LITTLE_ENDIAN
    9493    unsigned int ip_hl:4;               /**< header length */
    9594    unsigned int ip_v:4;                /**< version */
    9695#endif
    97 #if __BYTE_ORDER == __BIG_ENDIAN
     96#if BYTE_ORDER == __BIG_ENDIAN
    9897    unsigned int ip_v:4;                /**< version */
    9998    unsigned int ip_hl:4;               /**< header length */
     
    120119    u_int32_t seq;              /**< Sequence number */
    121120    u_int32_t ack_seq;          /**< Acknowledgement Number */
    122 #  if __BYTE_ORDER == __LITTLE_ENDIAN
     121#  if BYTE_ORDER == __LITTLE_ENDIAN
    123122    u_int16_t res1:4;           /**< Reserved bits */
    124123    u_int16_t doff:4;           
     
    130129    u_int16_t urg:1;            /**< URG flag */
    131130    u_int16_t res2:2;           /**< Reserved */
    132 #  elif __BYTE_ORDER == __BIG_ENDIAN
     131#  elif BYTE_ORDER == __BIG_ENDIAN
    133132    u_int16_t doff:4;           
    134133    u_int16_t res1:4;
  • lib/trace.c

    r60fc8aa r1f3696b  
    4343#include <errno.h>
    4444#include <fcntl.h>
    45 #include <net/ethernet.h>
    4645#include <netdb.h>
    4746#include <pcap.h>
     
    5150#include <sys/stat.h>
    5251#include <sys/types.h>
     52#ifdef HAVE_SYS_LIMITS_H
     53// For BSD, apparently
     54#  include <sys/limits.h>
     55#endif
    5356#include <sys/socket.h>
    5457#include <sys/un.h>
    5558#include <unistd.h>
     59#include <net/ethernet.h>
    5660#include <time.h>
    5761#include <sys/ioctl.h>
Note: See TracChangeset for help on using the changeset viewer.