• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src/router/avahi-0.6.31/avahi-compat-howl/include/salt/
1#ifndef _sw_interface_h
2#define _sw_interface_h
3
4/*
5 * Copyright 2003, 2004 Porchdog Software. All rights reserved.
6 *
7 *	Redistribution and use in source and binary forms, with or without modification,
8 *	are permitted provided that the following conditions are met:
9 *
10 *		1. Redistributions of source code must retain the above copyright notice,
11 *		   this list of conditions and the following disclaimer.
12 *		2. Redistributions in binary form must reproduce the above copyright notice,
13 *		   this list of conditions and the following disclaimer in the documentation
14 *		   and/or other materials provided with the distribution.
15 *
16 *	THIS SOFTWARE IS PROVIDED BY PORCHDOG SOFTWARE ``AS IS'' AND ANY
17 *	EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 *	WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19 *	IN NO EVENT SHALL THE HOWL PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
20 *	INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
21 *	BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 *	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
23 *	OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
24 *	OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
25 *	OF THE POSSIBILITY OF SUCH DAMAGE.
26 *
27 *	The views and conclusions contained in the software and documentation are those
28 *	of the authors and should not be interpreted as representing official policies,
29 *	either expressed or implied, of Porchdog Software.
30 */
31
32#include <salt/address.h>
33
34struct											_sw_network_interface;
35typedef struct _sw_network_interface * sw_network_interface;
36
37
38typedef enum _sw_network_interface_state
39{
40	SW_NETWORK_INTERFACE_RUNNING		= 0x1,
41} sw_network_interface_state;
42
43
44typedef struct _sw_mac_address
45{
46	sw_uint8	m_id[6];
47} sw_mac_address;
48
49
50sw_result HOWL_API
51sw_network_interfaces(
52				sw_uint32					*	count,
53				sw_network_interface	**	netifs);
54
55
56sw_result HOWL_API
57sw_network_interfaces_fina(
58				sw_uint32						count,
59				sw_network_interface	*	netifs);
60
61
62sw_result HOWL_API
63sw_network_interface_fina(
64				sw_network_interface		netif);
65
66
67sw_result  HOWL_API
68sw_network_interface_by_name(
69				sw_string					name,
70				sw_network_interface	*	netif);
71
72
73sw_result HOWL_API
74sw_network_interface_name(
75				sw_network_interface		netif,
76				sw_string					name,
77				sw_uint32						len);
78
79
80sw_result HOWL_API
81sw_network_interface_mac_address(
82				sw_network_interface		netif,
83				sw_mac_address			*	addr);
84
85
86sw_result HOWL_API
87sw_network_interface_ipv4_address(
88				sw_network_interface		netif,
89				sw_ipv4_address		*	addr);
90
91
92sw_result HOWL_API
93sw_network_interface_set_ipv4_address(
94				sw_network_interface		netif,
95				sw_ipv4_address			addr);
96
97
98sw_result HOWL_API
99sw_network_interface_index(
100				sw_network_interface		netif,
101				sw_uint32					*	index);
102
103
104sw_result HOWL_API
105sw_network_interface_linked(
106				sw_network_interface		netif,
107				sw_bool					*	linked);
108
109
110sw_result HOWL_API
111sw_network_interface_up(
112				sw_network_interface		netif);
113
114
115#endif
116