xref: /illumos-gate/usr/src/uts/common/inet/ipf/ipf.h (revision f4b3ec61)
17c478bd9Sstevel@tonic-gate /*
2ab25eeb5Syz  * Copyright (C) 1993-2001, 2003 by Darren Reed.
3ab25eeb5Syz  *
47c478bd9Sstevel@tonic-gate  * See the IPFILTER.LICENCE file for details on licencing.
57c478bd9Sstevel@tonic-gate  *
6ab25eeb5Syz  * @(#)ipf.h	1.12 6/5/96
7ab25eeb5Syz  * $Id: ipf.h,v 2.71.2.7 2005/06/12 07:18:31 darrenr Exp $
8ab25eeb5Syz  *
9*f4b3ec61Sdh  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
107c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
117c478bd9Sstevel@tonic-gate  */
127c478bd9Sstevel@tonic-gate 
137c478bd9Sstevel@tonic-gate #ifndef	__IPF_H__
147c478bd9Sstevel@tonic-gate #define	__IPF_H__
157c478bd9Sstevel@tonic-gate 
167c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
177c478bd9Sstevel@tonic-gate 
18ab25eeb5Syz #if defined(__osf__)
19ab25eeb5Syz # define radix_mask ipf_radix_mask
20ab25eeb5Syz # define radix_node ipf_radix_node
21ab25eeb5Syz # define radix_node_head ipf_radix_node_head
22ab25eeb5Syz #endif
23ab25eeb5Syz 
247c478bd9Sstevel@tonic-gate #include <sys/param.h>
257c478bd9Sstevel@tonic-gate #include <sys/types.h>
267c478bd9Sstevel@tonic-gate #include <sys/file.h>
277c478bd9Sstevel@tonic-gate /*
287c478bd9Sstevel@tonic-gate  * This is a workaround for <sys/uio.h> troubles on FreeBSD, HPUX, OpenBSD.
297c478bd9Sstevel@tonic-gate  * Needed here because on some systems <sys/uio.h> gets included by things
307c478bd9Sstevel@tonic-gate  * like <sys/socket.h>
317c478bd9Sstevel@tonic-gate  */
327c478bd9Sstevel@tonic-gate #ifndef _KERNEL
337c478bd9Sstevel@tonic-gate # define ADD_KERNEL
347c478bd9Sstevel@tonic-gate # define _KERNEL
357c478bd9Sstevel@tonic-gate # define KERNEL
367c478bd9Sstevel@tonic-gate #endif
377c478bd9Sstevel@tonic-gate #ifdef __OpenBSD__
387c478bd9Sstevel@tonic-gate struct file;
397c478bd9Sstevel@tonic-gate #endif
407c478bd9Sstevel@tonic-gate #include <sys/uio.h>
417c478bd9Sstevel@tonic-gate #ifdef ADD_KERNEL
427c478bd9Sstevel@tonic-gate # undef _KERNEL
437c478bd9Sstevel@tonic-gate # undef KERNEL
447c478bd9Sstevel@tonic-gate #endif
457c478bd9Sstevel@tonic-gate #include <sys/time.h>
467c478bd9Sstevel@tonic-gate #include <sys/socket.h>
477c478bd9Sstevel@tonic-gate #include <net/if.h>
487c478bd9Sstevel@tonic-gate #if __FreeBSD_version >= 300000
497c478bd9Sstevel@tonic-gate # include <net/if_var.h>
507c478bd9Sstevel@tonic-gate #endif
517c478bd9Sstevel@tonic-gate #include <netinet/in.h>
527c478bd9Sstevel@tonic-gate #include <netinet/in_systm.h>
537c478bd9Sstevel@tonic-gate #include <netinet/ip.h>
54ab25eeb5Syz #include <netinet/ip_icmp.h>
557c478bd9Sstevel@tonic-gate #ifndef	TCP_PAWS_IDLE	/* IRIX */
567c478bd9Sstevel@tonic-gate # include <netinet/tcp.h>
577c478bd9Sstevel@tonic-gate #endif
587c478bd9Sstevel@tonic-gate #include <netinet/udp.h>
597c478bd9Sstevel@tonic-gate 
607c478bd9Sstevel@tonic-gate #include <arpa/inet.h>
617c478bd9Sstevel@tonic-gate 
627c478bd9Sstevel@tonic-gate #include <errno.h>
637c478bd9Sstevel@tonic-gate #include <limits.h>
647c478bd9Sstevel@tonic-gate #include <netdb.h>
657c478bd9Sstevel@tonic-gate #include <stdlib.h>
66ab25eeb5Syz #include <stddef.h>
677c478bd9Sstevel@tonic-gate #include <stdio.h>
687c478bd9Sstevel@tonic-gate #if !defined(__SVR4) && !defined(__svr4__) && defined(sun)
697c478bd9Sstevel@tonic-gate # include <strings.h>
707c478bd9Sstevel@tonic-gate #endif
717c478bd9Sstevel@tonic-gate #include <string.h>
727c478bd9Sstevel@tonic-gate #include <unistd.h>
737c478bd9Sstevel@tonic-gate 
74*f4b3ec61Sdh #include "netinet/ipf_stack.h"
757c478bd9Sstevel@tonic-gate #include "netinet/ip_compat.h"
767c478bd9Sstevel@tonic-gate #include "netinet/ip_fil.h"
777c478bd9Sstevel@tonic-gate #include "netinet/ip_nat.h"
787c478bd9Sstevel@tonic-gate #include "netinet/ip_frag.h"
797c478bd9Sstevel@tonic-gate #include "netinet/ip_state.h"
807c478bd9Sstevel@tonic-gate #include "netinet/ip_proxy.h"
817c478bd9Sstevel@tonic-gate #include "netinet/ip_auth.h"
827c478bd9Sstevel@tonic-gate #include "netinet/ip_lookup.h"
837c478bd9Sstevel@tonic-gate #include "netinet/ip_pool.h"
84ab25eeb5Syz #ifdef IPFILTER_SCAN
85ab25eeb5Syz #include "netinet/ip_scan.h"
86ab25eeb5Syz #endif
877c478bd9Sstevel@tonic-gate #include "netinet/ip_htable.h"
88ab25eeb5Syz #ifdef IPFILTER_SYNC
89ab25eeb5Syz #include "netinet/ip_sync.h"
907c478bd9Sstevel@tonic-gate #endif
917c478bd9Sstevel@tonic-gate 
927c478bd9Sstevel@tonic-gate #include "opts.h"
937c478bd9Sstevel@tonic-gate 
947c478bd9Sstevel@tonic-gate #ifndef __P
957c478bd9Sstevel@tonic-gate # ifdef __STDC__
967c478bd9Sstevel@tonic-gate #  define	__P(x)	x
977c478bd9Sstevel@tonic-gate # else
987c478bd9Sstevel@tonic-gate #  define	__P(x)	()
997c478bd9Sstevel@tonic-gate # endif
1007c478bd9Sstevel@tonic-gate #endif
1017c478bd9Sstevel@tonic-gate #ifndef __STDC__
1027c478bd9Sstevel@tonic-gate # undef		const
1037c478bd9Sstevel@tonic-gate # define	const
1047c478bd9Sstevel@tonic-gate #endif
1057c478bd9Sstevel@tonic-gate 
1067c478bd9Sstevel@tonic-gate #ifndef	U_32_T
1077c478bd9Sstevel@tonic-gate # define	U_32_T	1
1087c478bd9Sstevel@tonic-gate # if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) || \
1097c478bd9Sstevel@tonic-gate     defined(__sgi)
1107c478bd9Sstevel@tonic-gate typedef	u_int32_t	u_32_t;
1117c478bd9Sstevel@tonic-gate # else
1127c478bd9Sstevel@tonic-gate #  if defined(__alpha__) || defined(__alpha) || defined(_LP64)
1137c478bd9Sstevel@tonic-gate typedef unsigned int	u_32_t;
1147c478bd9Sstevel@tonic-gate #  else
1157c478bd9Sstevel@tonic-gate #   if SOLARIS2 >= 6
1167c478bd9Sstevel@tonic-gate typedef uint32_t	u_32_t;
1177c478bd9Sstevel@tonic-gate #   else
1187c478bd9Sstevel@tonic-gate typedef unsigned int	u_32_t;
1197c478bd9Sstevel@tonic-gate #   endif
1207c478bd9Sstevel@tonic-gate #  endif
1217c478bd9Sstevel@tonic-gate # endif /* __NetBSD__ || __OpenBSD__ || __FreeBSD__ || __sgi */
1227c478bd9Sstevel@tonic-gate #endif /* U_32_T */
1237c478bd9Sstevel@tonic-gate 
1247c478bd9Sstevel@tonic-gate #ifndef	MAXHOSTNAMELEN
1257c478bd9Sstevel@tonic-gate # define	MAXHOSTNAMELEN	256
1267c478bd9Sstevel@tonic-gate #endif
1277c478bd9Sstevel@tonic-gate 
1287c478bd9Sstevel@tonic-gate #define	MAX_ICMPCODE	16
1297c478bd9Sstevel@tonic-gate #define	MAX_ICMPTYPE	19
1307c478bd9Sstevel@tonic-gate 
1317c478bd9Sstevel@tonic-gate 
1327c478bd9Sstevel@tonic-gate struct	ipopt_names	{
1337c478bd9Sstevel@tonic-gate 	int	on_value;
1347c478bd9Sstevel@tonic-gate 	int	on_bit;
1357c478bd9Sstevel@tonic-gate 	int	on_siz;
1367c478bd9Sstevel@tonic-gate 	char	*on_name;
1377c478bd9Sstevel@tonic-gate };
1387c478bd9Sstevel@tonic-gate 
1397c478bd9Sstevel@tonic-gate 
1407c478bd9Sstevel@tonic-gate typedef struct  alist_s {
1417c478bd9Sstevel@tonic-gate 	struct	alist_s	*al_next;
1427c478bd9Sstevel@tonic-gate 	int		al_not;
1437663b816Sml 	sa_family_t	al_family;
1447c478bd9Sstevel@tonic-gate 	i6addr_t	al_i6addr;
1457c478bd9Sstevel@tonic-gate 	i6addr_t	al_i6mask;
1467c478bd9Sstevel@tonic-gate } alist_t;
1477c478bd9Sstevel@tonic-gate 
1487c478bd9Sstevel@tonic-gate #define	al_addr	al_i6addr.in4_addr
1497c478bd9Sstevel@tonic-gate #define	al_mask	al_i6mask.in4_addr
1507c478bd9Sstevel@tonic-gate #define	al_1	al_addr
1517c478bd9Sstevel@tonic-gate #define	al_2	al_mask
1527c478bd9Sstevel@tonic-gate 
153ab25eeb5Syz 
154ab25eeb5Syz typedef	struct	{
155ab25eeb5Syz 	u_short	fb_c;
156ab25eeb5Syz 	u_char	fb_t;
157ab25eeb5Syz 	u_char	fb_f;
158ab25eeb5Syz 	u_32_t	fb_k;
159ab25eeb5Syz } fakebpf_t;
160ab25eeb5Syz 
161ab25eeb5Syz 
1627c478bd9Sstevel@tonic-gate #if defined(__NetBSD__) || defined(__OpenBSD__) || \
163ab25eeb5Syz         (_BSDI_VERSION >= 199701) || (__FreeBSD_version >= 300000) || \
164ab25eeb5Syz 	SOLARIS || defined(__sgi) || defined(__osf__) || defined(linux)
1657c478bd9Sstevel@tonic-gate # include <stdarg.h>
1667c478bd9Sstevel@tonic-gate typedef	int	(* ioctlfunc_t) __P((int, ioctlcmd_t, ...));
1677c478bd9Sstevel@tonic-gate #else
1687c478bd9Sstevel@tonic-gate typedef	int	(* ioctlfunc_t) __P((dev_t, ioctlcmd_t, void *));
1697c478bd9Sstevel@tonic-gate #endif
1707c478bd9Sstevel@tonic-gate typedef	void	(* addfunc_t) __P((int, ioctlfunc_t, void *));
1717c478bd9Sstevel@tonic-gate typedef	int	(* copyfunc_t) __P((void *, void *, size_t));
1727c478bd9Sstevel@tonic-gate 
1737c478bd9Sstevel@tonic-gate 
1747c478bd9Sstevel@tonic-gate /*
1757c478bd9Sstevel@tonic-gate  * SunOS4
1767c478bd9Sstevel@tonic-gate  */
1777c478bd9Sstevel@tonic-gate #if defined(sun) && !defined(__SVR4) && !defined(__svr4__)
1787c478bd9Sstevel@tonic-gate extern	int	ioctl __P((int, int, void *));
1797c478bd9Sstevel@tonic-gate #endif
1807c478bd9Sstevel@tonic-gate 
1817c478bd9Sstevel@tonic-gate extern	char	thishost[];
1827c478bd9Sstevel@tonic-gate extern	char	flagset[];
1837c478bd9Sstevel@tonic-gate extern	u_char	flags[];
1847c478bd9Sstevel@tonic-gate extern	struct ipopt_names ionames[];
1857c478bd9Sstevel@tonic-gate extern	struct ipopt_names secclass[];
1867c478bd9Sstevel@tonic-gate extern	char	*icmpcodes[MAX_ICMPCODE + 1];
1877c478bd9Sstevel@tonic-gate extern	char	*icmptypes[MAX_ICMPTYPE + 1];
1887c478bd9Sstevel@tonic-gate extern	int	use_inet6;
1897c478bd9Sstevel@tonic-gate extern	int	lineNum;
1907c478bd9Sstevel@tonic-gate extern	struct ipopt_names v6ionames[];
1917c478bd9Sstevel@tonic-gate 
1927c478bd9Sstevel@tonic-gate 
1937c478bd9Sstevel@tonic-gate extern int addicmp __P((char ***, struct frentry *, int));
1947c478bd9Sstevel@tonic-gate extern int addipopt __P((char *, struct ipopt_names *, int, char *));
1957c478bd9Sstevel@tonic-gate extern int addkeep __P((char ***, struct frentry *, int));
1967c478bd9Sstevel@tonic-gate extern int bcopywrap __P((void *, void *, size_t));
1977c478bd9Sstevel@tonic-gate extern void binprint __P((void *, size_t));
1987c478bd9Sstevel@tonic-gate extern void initparse __P((void));
1997c478bd9Sstevel@tonic-gate extern u_32_t buildopts __P((char *, char *, int));
2007c478bd9Sstevel@tonic-gate extern int checkrev __P((char *));
2017c478bd9Sstevel@tonic-gate extern int count6bits __P((u_32_t *));
2027c478bd9Sstevel@tonic-gate extern int count4bits __P((u_32_t));
2037c478bd9Sstevel@tonic-gate extern int extras __P((char ***, struct frentry *, int));
2047c478bd9Sstevel@tonic-gate extern char *fac_toname __P((int));
2057c478bd9Sstevel@tonic-gate extern int fac_findname __P((char *));
2067c478bd9Sstevel@tonic-gate extern void fill6bits __P((int, u_int *));
2079b4c7145Sjojemann extern int gethost __P((char *, i6addr_t *, int));
208ab25eeb5Syz extern int getport __P((struct frentry *, char *, u_short *));
2097c478bd9Sstevel@tonic-gate extern int getportproto __P((char *, int));
2107c478bd9Sstevel@tonic-gate extern int getproto __P((char *));
2117c478bd9Sstevel@tonic-gate extern char *getline __P((char *, size_t, FILE *, int *));
2127c478bd9Sstevel@tonic-gate extern int genmask __P((char *, u_32_t *));
213*f4b3ec61Sdh extern char *getnattype __P((struct nat *, int));
2147c478bd9Sstevel@tonic-gate extern char *getsumd __P((u_32_t));
2157c478bd9Sstevel@tonic-gate extern u_32_t getoptbyname __P((char *));
2167c478bd9Sstevel@tonic-gate extern u_32_t getoptbyvalue __P((int));
2177c478bd9Sstevel@tonic-gate extern u_32_t getv6optbyname __P((char *));
2187c478bd9Sstevel@tonic-gate extern u_32_t getv6optbyvalue __P((int));
219ab25eeb5Syz extern void hexdump __P((FILE *, void *, int, int));
2207c478bd9Sstevel@tonic-gate extern int icmpcode __P((char *));
2217c478bd9Sstevel@tonic-gate extern void initparse __P((void));
222ab25eeb5Syz extern void ipf_dotuning __P((int, char *, ioctlfunc_t));
2237c478bd9Sstevel@tonic-gate extern void ipf_addrule __P((int, ioctlfunc_t, void *));
2247c478bd9Sstevel@tonic-gate extern int ipf_parsefile __P((int, addfunc_t, ioctlfunc_t *, char *));
2257c478bd9Sstevel@tonic-gate extern int ipf_parsesome __P((int, addfunc_t, ioctlfunc_t *, FILE *));
2267c478bd9Sstevel@tonic-gate extern int ipmon_parsefile __P((char *));
227ab25eeb5Syz extern int ipmon_parsesome __P((FILE *));
2287c478bd9Sstevel@tonic-gate extern void ipnat_addrule __P((int, ioctlfunc_t, void *));
2297c478bd9Sstevel@tonic-gate extern int ipnat_parsefile __P((int, addfunc_t, ioctlfunc_t, char *));
230ab25eeb5Syz extern int ipnat_parsesome __P((int, addfunc_t, ioctlfunc_t, FILE *));
2317c478bd9Sstevel@tonic-gate extern int ippool_parsefile __P((int, char *, ioctlfunc_t));
232ab25eeb5Syz extern int ippool_parsesome __P((int, FILE *, ioctlfunc_t));
2337c478bd9Sstevel@tonic-gate extern int kmemcpywrap __P((void *, void *, size_t));
2347c478bd9Sstevel@tonic-gate extern char *kvatoname __P((ipfunc_t, ioctlfunc_t));
2357c478bd9Sstevel@tonic-gate extern int load_hash __P((struct iphtable_s *, struct iphtent_s *,
2367c478bd9Sstevel@tonic-gate 			  ioctlfunc_t));
2377c478bd9Sstevel@tonic-gate extern int load_hashnode __P((int, char *, struct iphtent_s *, ioctlfunc_t));
2387c478bd9Sstevel@tonic-gate extern int load_pool __P((struct ip_pool_s *list, ioctlfunc_t));
2397c478bd9Sstevel@tonic-gate extern int load_poolnode __P((int, char *, ip_pool_node_t *, ioctlfunc_t));
2407c478bd9Sstevel@tonic-gate extern int loglevel __P((char **, u_int *, int));
2417c478bd9Sstevel@tonic-gate extern alist_t *make_range __P((int, struct in_addr, struct in_addr));
2427c478bd9Sstevel@tonic-gate extern ipfunc_t nametokva __P((char *, ioctlfunc_t));
2437c478bd9Sstevel@tonic-gate extern void nat_setgroupmap __P((struct ipnat *));
2447c478bd9Sstevel@tonic-gate extern int ntomask __P((int, int, u_32_t *));
2457c478bd9Sstevel@tonic-gate extern u_32_t optname __P((char ***, u_short *, int));
2467c478bd9Sstevel@tonic-gate extern struct frentry *parse __P((char *, int));
2477c478bd9Sstevel@tonic-gate extern char *portname __P((int, int));
2487c478bd9Sstevel@tonic-gate extern int portnum __P((char *, char *, u_short *, int));
2497c478bd9Sstevel@tonic-gate extern int ports __P((char ***, char *, u_short *, int *, u_short *, int));
2507c478bd9Sstevel@tonic-gate extern int pri_findname __P((char *));
2517c478bd9Sstevel@tonic-gate extern char *pri_toname __P((int));
2527c478bd9Sstevel@tonic-gate extern void print_toif __P((char *, struct frdest *));
2537c478bd9Sstevel@tonic-gate extern void printaps __P((ap_session_t *, int));
2547c478bd9Sstevel@tonic-gate extern void printbuf __P((char *, int, int));
2557c478bd9Sstevel@tonic-gate extern void printfr __P((struct frentry *, ioctlfunc_t));
256*f4b3ec61Sdh extern struct iphtable_s *printhash_live __P((struct iphtable_s *, int, char*, int));
257*f4b3ec61Sdh extern void printhashdata __P((struct iphtable_s *, int));
258ab25eeb5Syz extern void printtunable __P((ipftune_t *));
259ab25eeb5Syz extern struct iphtable_s *printhash __P((struct iphtable_s *, copyfunc_t,
260ab25eeb5Syz 					 char *, int));
2617c478bd9Sstevel@tonic-gate extern struct iphtent_s *printhashnode __P((struct iphtable_s *,
2627c478bd9Sstevel@tonic-gate 					    struct iphtent_s *,
2637c478bd9Sstevel@tonic-gate 					    copyfunc_t, int));
2647c478bd9Sstevel@tonic-gate extern void printhostmask __P((int, u_32_t *, u_32_t *));
2657c478bd9Sstevel@tonic-gate extern void printip __P((u_32_t *));
2667c478bd9Sstevel@tonic-gate extern void printlog __P((struct frentry *));
2677c478bd9Sstevel@tonic-gate extern void printlookup __P((i6addr_t *addr, i6addr_t *mask));
2687663b816Sml extern void printmask __P((int, u_32_t *));
2697c478bd9Sstevel@tonic-gate extern void printpacket __P((struct ip *));
2707c478bd9Sstevel@tonic-gate extern void printpacket6 __P((struct ip *));
271ab25eeb5Syz extern struct ip_pool_s *printpool __P((struct ip_pool_s *, copyfunc_t,
272ab25eeb5Syz 					char *, int));
273*f4b3ec61Sdh extern struct ip_pool_s *printpool_live __P((struct ip_pool_s *, int, char*, int));
274*f4b3ec61Sdh extern void printpooldata __P((struct ip_pool_s *, int));
2757c478bd9Sstevel@tonic-gate extern struct ip_pool_node *printpoolnode __P((struct ip_pool_node *, int));
276ab25eeb5Syz extern void printproto __P((struct protoent *, int, struct ipnat *));
2777c478bd9Sstevel@tonic-gate extern void printportcmp __P((int, struct frpcmp *));
2787c478bd9Sstevel@tonic-gate extern void optprint __P((u_short *, u_long, u_long));
2797c478bd9Sstevel@tonic-gate #ifdef	USE_INET6
2807c478bd9Sstevel@tonic-gate extern void optprintv6 __P((u_short *, u_long, u_long));
2817c478bd9Sstevel@tonic-gate #endif
2827c478bd9Sstevel@tonic-gate extern int ratoi __P((char *, int *, int, int));
2837c478bd9Sstevel@tonic-gate extern int ratoui __P((char *, u_int *, u_int, u_int));
2847c478bd9Sstevel@tonic-gate extern int remove_hash __P((struct iphtable_s *, ioctlfunc_t));
2857c478bd9Sstevel@tonic-gate extern int remove_hashnode __P((int, char *, struct iphtent_s *, ioctlfunc_t));
2867c478bd9Sstevel@tonic-gate extern int remove_pool __P((ip_pool_t *, ioctlfunc_t));
2877c478bd9Sstevel@tonic-gate extern int remove_poolnode __P((int, char *, ip_pool_node_t *, ioctlfunc_t));
2887c478bd9Sstevel@tonic-gate extern u_char tcp_flags __P((char *, u_char *, int));
2897c478bd9Sstevel@tonic-gate extern u_char tcpflags __P((char *));
2907c478bd9Sstevel@tonic-gate extern void printc __P((struct frentry *));
2917c478bd9Sstevel@tonic-gate extern void printC __P((int));
2927c478bd9Sstevel@tonic-gate extern void emit __P((int, int, void *, struct frentry *));
2937c478bd9Sstevel@tonic-gate extern u_char secbit __P((int));
2947c478bd9Sstevel@tonic-gate extern u_char seclevel __P((char *));
295ab25eeb5Syz extern void printfraginfo __P((char *, struct ipfr *));
2967c478bd9Sstevel@tonic-gate extern void printifname __P((char *, char *, void *));
2977c478bd9Sstevel@tonic-gate extern char *hostname __P((int, void *));
298ab25eeb5Syz extern struct ipstate *printstate __P((struct ipstate *, int, u_long));
2997c478bd9Sstevel@tonic-gate extern void printsbuf __P((char *));
3007c478bd9Sstevel@tonic-gate extern void printnat __P((struct ipnat *, int));
301*f4b3ec61Sdh extern void printactivenat __P((struct nat *, int, int));
3027c478bd9Sstevel@tonic-gate extern void printhostmap __P((struct hostmap *, u_int));
3037c478bd9Sstevel@tonic-gate extern void printpacket __P((struct ip *));
3047c478bd9Sstevel@tonic-gate 
3057c478bd9Sstevel@tonic-gate extern void set_variable __P((char *, char *));
3067c478bd9Sstevel@tonic-gate extern char *get_variable __P((char *, char **, int));
3077c478bd9Sstevel@tonic-gate extern void resetlexer __P((void));
3087c478bd9Sstevel@tonic-gate 
3097c478bd9Sstevel@tonic-gate #if SOLARIS
3107c478bd9Sstevel@tonic-gate extern int gethostname __P((char *, int ));
3117c478bd9Sstevel@tonic-gate extern void sync __P((void));
3127c478bd9Sstevel@tonic-gate #endif
3137c478bd9Sstevel@tonic-gate 
3147c478bd9Sstevel@tonic-gate #endif /* __IPF_H__ */
315