Skip to content

Commit

Permalink
libtap: remove external header (useless really)
Browse files Browse the repository at this point in the history
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
  • Loading branch information
fabbione committed Sep 15, 2012
1 parent 5d10d0d commit ee1fe09
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 41 deletions.
2 changes: 0 additions & 2 deletions libtap/Makefile.am
Expand Up @@ -9,8 +9,6 @@ LIBS = -lpthread

include_HEADERS = libtap.h

noinst_HEADERS = libtap-private.h

pkgconfigdir = $(libdir)/pkgconfig

pkgconfig_DATA = libtap.pc
Expand Down
35 changes: 0 additions & 35 deletions libtap/libtap-private.h

This file was deleted.

32 changes: 28 additions & 4 deletions libtap/libtap.c
Expand Up @@ -17,15 +17,39 @@
#include <pthread.h>
#include <limits.h>
#include <stdio.h>

#ifdef TEST
#include <net/if.h>
#include <ifaddrs.h>
#include <stdint.h>
#endif

#include "libtap.h"
#include "libtap-private.h"

#define MAX_IP_CHAR 128
#define MAX_PREFIX_CHAR 4
#define MAX_MAC_CHAR 18

struct _ip {
char ip_addr[MAX_IP_CHAR];
char prefix[MAX_PREFIX_CHAR];
struct _ip *next;
};

struct _iface {
struct ifreq ifr;
int fd;
char default_mac[MAX_MAC_CHAR];
int default_mtu;
char updownpath[PATH_MAX];
int hasupdown;
int up;
struct _ip *ip;
struct _iface *next;
};
#define ifname ifr.ifr_name

struct _config {
struct _iface *head;
int sockfd;
};

static int lib_init = 0;
static struct _config lib_cfg;
Expand Down

0 comments on commit ee1fe09

Please sign in to comment.