Skip to content

Commit

Permalink
[nozzle] move code around to reflect public API and internal functions
Browse files Browse the repository at this point in the history
cleanup _get_mtu in the process

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
  • Loading branch information
fabbione committed Apr 20, 2018
1 parent 1d2ca0e commit 4f0d60c
Show file tree
Hide file tree
Showing 2 changed files with 240 additions and 262 deletions.
21 changes: 0 additions & 21 deletions libnozzle/internals.c
Expand Up @@ -193,27 +193,6 @@ static void _close_cfg(void)
}
}

static int _get_mtu(const nozzle_t nozzle)
{
int err = 0, savederrno = 0;
struct ifreq ifr;

memset(&ifr, 0, sizeof(struct ifreq));
strncpy(ifname, nozzle->name, IFNAMSIZ);

err = ioctl(lib_cfg.ioctlfd, SIOCGIFMTU, &ifr);
if (err) {
savederrno = errno;
goto out_clean;
}

err = ifr.ifr_mtu;

out_clean:
errno = savederrno;
return err;
}

static int _get_mac(const nozzle_t nozzle, char **ether_addr)
{
int err = 0, savederrno = 0;
Expand Down

0 comments on commit 4f0d60c

Please sign in to comment.