Skip to content

Commit

Permalink
do not include pcap/sll.h, it is not included in debian packages, ins…
Browse files Browse the repository at this point in the history
…tead move sll declarations to sniff.h so it can compile wihtout installink libpcap from source.
  • Loading branch information
Martin Vit committed Sep 24, 2010
1 parent af322d4 commit 5ce8aea
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion sniff.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ and insert them into Call class.
#include <syslog.h>

#include <pcap.h>
#include <pcap/sll.h>
//#include <pcap/sll.h>

#include "calltable.h"
#include "sniff.h"
Expand Down
10 changes: 10 additions & 0 deletions sniff.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@

void readdump(pcap_t *handle);

/* this is copied from libpcap sll.h header file, which is not included in debian distribution */
#define SLL_ADDRLEN 8 /* length of address field */
struct sll_header {
u_int16_t sll_pkttype; /* packet type */
u_int16_t sll_hatype; /* link-layer address type */
u_int16_t sll_halen; /* link-layer address length */
u_int8_t sll_addr[SLL_ADDRLEN]; /* link-layer address */
u_int16_t sll_protocol; /* protocol */
};

#if 1
struct iphdr {
#if defined(__LITTLE_ENDIAN)
Expand Down

0 comments on commit 5ce8aea

Please sign in to comment.