Skip to content

Commit

Permalink
[nozzle] rename struct _iface to nozzle_iface (looks better on public…
Browse files Browse the repository at this point in the history
… headers)

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
  • Loading branch information
fabbione committed Mar 1, 2018
1 parent 1bdf707 commit 59f25b9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions libnozzle/libnozzle.c
Expand Up @@ -48,7 +48,7 @@ struct _ip {
struct _ip *next;
};

struct _iface {
struct nozzle_iface {
struct ifreq ifr;
int fd;
char tapname[IFNAMSIZ];
Expand All @@ -59,12 +59,12 @@ struct _iface {
int hasupdown;
int up;
struct _ip *ip;
struct _iface *next;
struct nozzle_iface *next;
};
#define ifname ifr.ifr_name

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

Expand Down Expand Up @@ -446,12 +446,12 @@ nozzle_t tap_open(char *dev, size_t dev_size, const char *updownpath)
}
}

tap = malloc(sizeof(struct _iface));
tap = malloc(sizeof(struct nozzle_iface));
if (!tap) {
return NULL;
}

memset(tap, 0, sizeof(struct _iface));
memset(tap, 0, sizeof(struct nozzle_iface));

pthread_mutex_lock(&lib_mutex);

Expand Down
2 changes: 1 addition & 1 deletion libnozzle/libnozzle.h
Expand Up @@ -21,7 +21,7 @@
* nozzle is a commodity library to manage tap (ethernet) interfaces
*/

typedef struct _iface *nozzle_t;
typedef struct nozzle_iface *nozzle_t;

nozzle_t tap_open(char *dev, size_t dev_size, const char *updownpath);
int tap_close(nozzle_t tap);
Expand Down

0 comments on commit 59f25b9

Please sign in to comment.