3 * Copyright (C) 2008 Tomas 'ZeXx86' Jedrzejek (zexx86@zexos.org)
4 * Copyright (C) 2009 Tomas 'ZeXx86' Jedrzejek (zexx86@zexos.org)
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
27 /* type of the ip adddress configuration */
28 #define IF_CFG_TYPE_STATIC 0
29 #define IF_CFG_TYPE_DHCP 1
30 #define IF_CFG_TYPE_RADVERT 2 /* ipv6 only */
32 /* Network interface structure */
33 typedef struct netif_context
{
34 struct netif_context
*next
, *prev
;
36 //struct netaddr_t *addr;
48 extern unsigned netif_ip_addr (netif_t
*netif
, net_ipv4 ip
, unsigned char cfg
);
49 extern unsigned netif_ipv6_addr (netif_t
*netif
, net_ipv6 ip
, unsigned char cfg
);
50 extern unsigned netif_gw_addr (netif_t
*netif
, net_ipv4 gw
);
51 extern unsigned netif_gwv6_addr (netif_t
*netif
, net_ipv6 gw
);
52 extern netif_t
*netif_findbyname (char *name
);
53 extern netif_t
*netif_create (struct netdev_t
*dev
);
54 extern void iflist_display ();
55 extern net_port
netif_port_get ();
56 extern unsigned init_netif ();