Mirror of git://git.busybox.net/busybox with our patches on top
Source
static const struct address_family_t *get_address_family(const struct address_family_t *const af[], char *name)
/* vi: set sw=4 ts=4: */
/*
* ifupdown for busybox
* Copyright (c) 2002 Glenn McGrath
* Copyright (c) 2003-2004 Erik Andersen <andersen@codepoet.org>
*
* Based on ifupdown v 0.6.4 by Anthony Towns
* Copyright (c) 1999 Anthony Towns <aj@azure.humbug.org.au>
*
* Changes to upstream version
* Remove checks for kernel version, assume kernel version 2.2.0 or better.
* Lines in the interfaces file cannot wrap.
* To adhere to the FHS, the default state file is /var/run/ifstate
* (defined via CONFIG_IFUPDOWN_IFSTATE_PATH) and can be overridden by build
* configuration.
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
/* After libbb.h, since it needs sys/types.h on some systems */
/*fprintf(stderr, args)*/
/* Forward declaration */
struct interface_defn_t;
typedef int execfn(char *command);
struct method_t {
const char *name;
int (*up)(struct interface_defn_t *ifd, execfn *e) FAST_FUNC;
int (*down)(struct interface_defn_t *ifd, execfn *e) FAST_FUNC;
};
struct address_family_t {
const char *name;
int n_methods;
const struct method_t *method;
};
struct mapping_defn_t {
struct mapping_defn_t *next;
int max_matches;
int n_matches;
char **match;
char *script;