xref: /titanic_44/usr/src/cmd/cmd-inet/usr.sbin/ifconfig/ifconfig.h (revision 49b225e1cfa7bbf7738d4df0a03f18e3283426eb)
1 /*
2  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
3  * Use is subject to license terms.
4  */
5 /*
6  * Copyright (c) 1983 Regents of the University of California.
7  * All rights reserved.  The Berkeley software License Agreement
8  * specifies the terms and conditions for redistribution.
9  */
10 
11 #ifndef	_IFCONFIG_H
12 #define	_IFCONFIG_H
13 
14 #ifdef	__cplusplus
15 extern "C" {
16 #endif
17 
18 #include <libdlpi.h>
19 
20 /*
21  * return values for (af_getaddr)() from in_getprefixlen()
22  */
23 #define	BAD_ADDR	-1	/* prefix is invalid */
24 #define	NO_PREFIX	-2	/* no prefix was found */
25 
26 /* No suitable header file defines this, though it's in libsocket */
27 extern int	getnetmaskbyaddr(struct in_addr, struct in_addr *);
28 
29 extern int	debug;
30 
31 extern void	Perror0(const char *);
32 extern void	Perror0_exit(const char *);
33 extern void	Perror2(const char *, const char *);
34 extern void	Perror2_exit(const char *, const char *);
35 extern void	Perrdlpi(const char *, const char *, int);
36 extern void	Perrdlpi_exit(const char *, const char *, int);
37 
38 extern int	doifrevarp(const char *, struct sockaddr_in *);
39 
40 extern void	dlpi_print_address(const char *);
41 
42 #ifdef	__cplusplus
43 }
44 #endif
45 
46 #endif	/* _IFCONFIG_H */
47