• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/ap/gpl/timemachine/avahi-0.6.25/avahi-compat-howl/include/salt/
1#ifndef _salt_address_h
2#define _salt_address_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
33#include <salt/salt.h>
34
35
36#if defined(__cplusplus)
37extern "C"
38{
39#endif
40
41
42typedef struct _sw_ipv4_address
43{
44	sw_uint32	m_addr;
45} sw_ipv4_address;
46
47typedef sw_uint32 sw_saddr;
48
49
50sw_ipv4_address HOWL_API
51sw_ipv4_address_any(void);
52
53
54sw_ipv4_address HOWL_API
55sw_ipv4_address_loopback(void);
56
57
58sw_result HOWL_API
59sw_ipv4_address_init(
60				sw_ipv4_address	*	self);
61
62
63sw_result HOWL_API
64sw_ipv4_address_init_from_saddr(
65				sw_ipv4_address	*	self,
66				sw_saddr			saddr);
67
68
69sw_result HOWL_API
70sw_ipv4_address_init_from_name(
71				sw_ipv4_address		*	self,
72				sw_const_string	name);
73
74
75sw_result HOWL_API
76sw_ipv4_address_init_from_address(
77				sw_ipv4_address		*	self,
78				sw_ipv4_address			addr);
79
80
81sw_result HOWL_API
82sw_ipv4_address_init_from_this_host(
83				sw_ipv4_address		*	self);
84
85
86sw_result HOWL_API
87sw_ipv4_address_fina(
88				sw_ipv4_address	self);
89
90
91sw_bool HOWL_API
92sw_ipv4_address_is_any(
93				sw_ipv4_address	self);
94
95
96sw_saddr HOWL_API
97sw_ipv4_address_saddr(
98				sw_ipv4_address	self);
99
100
101sw_string HOWL_API
102sw_ipv4_address_name(
103				sw_ipv4_address	self,
104				sw_string			name,
105				sw_uint32				len);
106
107
108sw_result HOWL_API
109sw_ipv4_address_decompose(
110				sw_ipv4_address	self,
111				sw_uint8			*	a1,
112				sw_uint8			*	a2,
113				sw_uint8			*	a3,
114				sw_uint8			*	a4);
115
116
117sw_bool HOWL_API
118sw_ipv4_address_equals(
119				sw_ipv4_address	self,
120				sw_ipv4_address	addr);
121
122
123#if defined(__cplusplus)
124}
125#endif
126
127
128#endif
129