xref: /titanic_41/usr/src/cmd/cmd-inet/usr.sbin/ifconfig/ifconfig.h (revision 7b209c2cc5ea45251aba06dcc6181d3f23da807a)
1 /*
2  * Copyright 2008 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 #pragma ident	"%Z%%M%	%I%	%E% SMI"
15 
16 #ifdef	__cplusplus
17 extern "C" {
18 #endif
19 
20 #include <libdlpi.h>
21 
22 /*
23  * return values for (af_getaddr)() from in_getprefixlen()
24  */
25 #define	BAD_ADDR	-1	/* prefix is invalid */
26 #define	NO_PREFIX	-2	/* no prefix was found */
27 
28 /* No suitable header file defines this, though it's in libsocket */
29 extern int	getnetmaskbyaddr(struct in_addr, struct in_addr *);
30 
31 extern int	debug;
32 
33 extern void	Perror0(const char *);
34 extern void	Perror0_exit(const char *);
35 extern void	Perror2(const char *, const char *);
36 extern void	Perror2_exit(const char *, const char *);
37 extern void	Perrdlpi(const char *, const char *, int);
38 extern void	Perrdlpi_exit(const char *, const char *, int);
39 
40 extern int	doifrevarp(const char *, struct sockaddr_in *);
41 
42 extern int	dlpi_set_address(const char *, uchar_t *, uint_t);
43 extern void	dlpi_print_address(const char *);
44 
45 #ifdef	__cplusplus
46 }
47 #endif
48 
49 #endif	/* _IFCONFIG_H */
50