4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
26 * IPv4 implementation-specific definitions
32 #pragma ident "%Z%%M% %I% %E% SMI"
38 #define RT_UNUSED 1 /* Table entry is unused */
39 #define RT_DEFAULT 2 /* Gateway is a default router */
40 #define RT_HOST 4 /* Destination is a host */
41 #define RT_NET 8 /* Destination is a network */
42 #define RT_NG 10 /* Route is No Good */
43 #define IPV4_ROUTE_TABLE_SIZE (5) /* Number of entries in the table */
45 #define IPV4_ADD_ROUTE 0
46 #define IPV4_DEL_ROUTE 1
47 #define IPV4_BAD_ROUTE 2
49 extern char *inet_ntoa(struct in_addr
);
50 extern void ipv4_setdefaultrouter(struct in_addr
*);
51 extern int ipv4_setpromiscuous(int);
52 extern void ipv4_setipaddr(struct in_addr
*);
53 extern void ipv4_getipaddr(struct in_addr
*);
54 extern void ipv4_setnetmask(struct in_addr
*);
55 extern void ipv4_getnetmask(struct in_addr
*);
56 extern int ipv4_route(int, uint8_t, struct in_addr
*,
58 extern void ipv4_setmaxttl(uint8_t);
59 extern in_addr_t
inet_addr(const char *);
60 extern void hexdump(char *, int);
61 extern int prom_cached_reply(int);
62 extern void ipv4_getnetid(struct in_addr
*);