diff options
| author | Roy Marples <roy@marples.name> | 2014-04-28 12:02:12 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2014-04-28 12:02:12 +0000 |
| commit | 94bec97280d1ade4731040e1fd9dd234fe0fdb3f (patch) | |
| tree | a251bb34ee3f8147d7730a1ef76b2a47916b1cda /if.c | |
| parent | e9f942eab98b3b91ae4c930a23fce38508a3f363 (diff) | |
| download | dhcpcd-94bec97280d1ade4731040e1fd9dd234fe0fdb3f.tar.xz | |
Namespace all public dhcpcd.c functions.
Add ipv4, ipv6, dhcp and dhcp6 options to re-enable if disabled globally.
Try and load a delegated interface if not running on all interfaces.
Fix delegated interfaces without a prefix set.
Diffstat (limited to 'if.c')
| -rw-r--r-- | if.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -482,6 +482,20 @@ if_discover(struct dhcpcd_ctx *ctx, int argc, char * const *argv) return ifs; } +struct interface * +if_find(struct dhcpcd_ctx *ctx, const char *ifname) +{ + struct interface *ifp; + + if (ctx != NULL && ctx->ifaces != NULL) { + TAILQ_FOREACH(ifp, ctx->ifaces, next) { + if (strcmp(ifp->name, ifname) == 0) + return ifp; + } + } + return NULL; +} + int if_domtu(const char *ifname, short int mtu) { |
