1 #ifndef _salt_address_h
2 #define _salt_address_h
5 * Copyright 2003, 2004 Porchdog Software. All rights reserved.
7 * Redistribution and use in source and binary forms, with or without modification,
8 * are permitted provided that the following conditions are met:
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.
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.
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.
33 #include <salt/salt.h>
36 #if defined(__cplusplus)
42 typedef struct _sw_ipv4_address
47 typedef sw_uint32 sw_saddr;
50 sw_ipv4_address HOWL_API
51 sw_ipv4_address_any(void);
54 sw_ipv4_address HOWL_API
55 sw_ipv4_address_loopback(void);
60 sw_ipv4_address * self);
64 sw_ipv4_address_init_from_saddr(
65 sw_ipv4_address * self,
70 sw_ipv4_address_init_from_name(
71 sw_ipv4_address * self,
72 sw_const_string name);
76 sw_ipv4_address_init_from_address(
77 sw_ipv4_address * self,
78 sw_ipv4_address addr);
82 sw_ipv4_address_init_from_this_host(
83 sw_ipv4_address * self);
88 sw_ipv4_address self);
92 sw_ipv4_address_is_any(
93 sw_ipv4_address self);
97 sw_ipv4_address_saddr(
98 sw_ipv4_address self);
102 sw_ipv4_address_name(
103 sw_ipv4_address self,
109 sw_ipv4_address_decompose(
110 sw_ipv4_address self,
118 sw_ipv4_address_equals(
119 sw_ipv4_address self,
120 sw_ipv4_address addr);
123 #if defined(__cplusplus)