Changeset 0a22046


Ignore:
Timestamp:
08/18/06 17:51:32 (14 years ago)
Author:
Perry Lorier <perry@…>
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:
b3a76bf
Parents:
7ecfe7f
Message:

New automake infrastructure
Moved a lot of C++ libpacketdump parsers to C (they weren't using any C++ features and it makes automake happier)

Location:
libpacketdump
Files:
1 edited
7 moved

Legend:

Unmodified
Added
Removed
  • libpacketdump/Makefile.am

    r7ecfe7f r0a22046  
    2525
    2626# Decoders for various ethertypes (in decimal)
    27 BIN_PROTOCOLS+=eth_2048.la
    28 BIN_PROTOCOLS+=eth_2054.la
    29 TXT_PROTOCOLS+=eth_33024.protocol
     27BIN_PROTOCOLS+=eth_2048.la              # IPv4
     28BIN_PROTOCOLS+=eth_2054.la              # ARP
     29TXT_PROTOCOLS+=eth_33024.protocol       # IPv6
    3030
    3131# IP Protocol decoders
     
    5353link_11_la_LDFLAGS=-module
    5454
     55eth_2048_la_LDFLAGS=-module
     56eth_2054_la_LDFLAGS=-module
     57
     58ip_1_la_LDFLAGS=-module
     59ip_6_la_LDFLAGS=-module
     60ip_17_la_LDFLAGS=-module
     61ip_33_la_LDFLAGS=-module
     62ip_132_la_LDFLAGS=-module
     63
    5564SUBDIRS = parser
    5665
     
    5867
    5968plugin_LTLIBRARIES = $(BIN_PROTOCOLS)
    60 plugin_DATA = $(TXT_PROTOCOLS))
     69plugin_DATA = $(TXT_PROTOCOLS)
    6170
    6271INCLUDES= @ADD_INCLS@ -I../lib -I../
  • libpacketdump/eth_2048.c

    r889ddc3 r0a22046  
    2424#define DISPLAYIP(x,fmt) DISPLAY_EXP(x,fmt,inet_ntoa(*(struct in_addr*)&ip->x))
    2525
    26 extern "C"
    2726void decode(int link_type,char *packet,int len)
    2827{
  • libpacketdump/eth_2054.c

    r4e65f42 r0a22046  
    2929        static char buffer[1024];
    3030        char ether_buf[18] = {0, };
     31        int i;
     32
    3133        if (hrd==NULL)
    3234                return "Truncated (Truncated)";
     
    3739                        break;
    3840                default:
    39                         int i;
    4041                        for (i=0;i<arp->ar_hln;i++) {
    4142                                snprintf(buffer,sizeof(buffer),"%s %02x",
     
    5354                        break;
    5455                default:
    55                         int i;
    5656                        strncat(buffer," (",sizeof(buffer));
    5757                        for (i=0;i<arp->ar_pln;i++) {
     
    6565}
    6666
    67 extern "C"
    6867void decode(int link_type,char *packet,int len)
    6968{
  • libpacketdump/ip_1.c

    r4e65f42 r0a22046  
    3939};
    4040
    41 extern "C"
    4241void decode(int link_type,char *packet,int len)
    4342{
  • libpacketdump/ip_132.c

    r950d54a r0a22046  
    22#include <inttypes.h>
    33#include <dlfcn.h>
    4 #include <map>
    54#include "libpacketdump.h"
    65
     
    152151}
    153152
    154 extern "C"
    155153void decode(int link_type,char *packet,int len)
    156154{
  • libpacketdump/ip_17.c

    re3b0188 r0a22046  
    22#include <inttypes.h>
    33#include <dlfcn.h>
    4 #include <map>
    54#include "libpacketdump.h"
    65#include "libtrace.h"
     
    2625
    2726
    28 extern "C"
    2927void decode(int link_type,char *packet,int len)
    3028{
  • libpacketdump/ip_33.c

    r950d54a r0a22046  
    33#include <inttypes.h>
    44#include <dlfcn.h>
    5 #include <map>
    65#include "libpacketdump.h"
    76#include <netinet/tcp.h>
     
    7473}
    7574
    76 extern "C"
    7775void decode(int link_type,char *packet,int len)
    7876{
  • libpacketdump/ip_6.c

    r4e65f42 r0a22046  
    4646}
    4747
    48 extern "C"
    4948void decode(int link_type,char *packet,int len)
    5049{
     
    9796        DISPLAYS(urg_ptr," Urgent %i");
    9897        unsigned char *pkt = (unsigned char*)packet+sizeof(*tcp);
    99         int plen = (len-sizeof *tcp) <? (tcp->doff*4-sizeof *tcp);
     98        int plen = (len-sizeof *tcp) < (tcp->doff*4-sizeof(*tcp))?(len-sizeof(*tcp)):(tcp->doff*4-sizeof *tcp);
    10099        unsigned char type,optlen,*data;
    101100        while(get_next_option(&pkt,&plen,&type,&optlen,&data)) {
Note: See TracChangeset for help on using the changeset viewer.