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 * 923a1cceaSRoger A. Faulkner * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. 107c478bd9Sstevel@tonic-gate */ 117c478bd9Sstevel@tonic-gate 127c478bd9Sstevel@tonic-gate #ifndef __IPF_H__ 137c478bd9Sstevel@tonic-gate #define __IPF_H__ 147c478bd9Sstevel@tonic-gate 15ab25eeb5Syz #if defined(__osf__) 16ab25eeb5Syz # define radix_mask ipf_radix_mask 17ab25eeb5Syz # define radix_node ipf_radix_node 18ab25eeb5Syz # define radix_node_head ipf_radix_node_head 19ab25eeb5Syz #endif 20ab25eeb5Syz 217c478bd9Sstevel@tonic-gate #include <sys/param.h> 227c478bd9Sstevel@tonic-gate #include <sys/types.h> 237c478bd9Sstevel@tonic-gate #include <sys/file.h> 247c478bd9Sstevel@tonic-gate /* 257c478bd9Sstevel@tonic-gate * This is a workaround for <sys/uio.h> troubles on FreeBSD, HPUX, OpenBSD. 267c478bd9Sstevel@tonic-gate * Needed here because on some systems <sys/uio.h> gets included by things 277c478bd9Sstevel@tonic-gate * like <sys/socket.h> 287c478bd9Sstevel@tonic-gate */ 297c478bd9Sstevel@tonic-gate #ifndef _KERNEL 307c478bd9Sstevel@tonic-gate # define ADD_KERNEL 317c478bd9Sstevel@tonic-gate # define _KERNEL 327c478bd9Sstevel@tonic-gate # define KERNEL 337c478bd9Sstevel@tonic-gate #endif 347c478bd9Sstevel@tonic-gate #ifdef __OpenBSD__ 357c478bd9Sstevel@tonic-gate struct file; 367c478bd9Sstevel@tonic-gate #endif 377c478bd9Sstevel@tonic-gate #include <sys/uio.h> 387c478bd9Sstevel@tonic-gate #ifdef ADD_KERNEL 397c478bd9Sstevel@tonic-gate # undef _KERNEL 407c478bd9Sstevel@tonic-gate # undef KERNEL 417c478bd9Sstevel@tonic-gate #endif 427c478bd9Sstevel@tonic-gate #include <sys/time.h> 437c478bd9Sstevel@tonic-gate #include <sys/socket.h> 447c478bd9Sstevel@tonic-gate #include <net/if.h> 457c478bd9Sstevel@tonic-gate #if __FreeBSD_version >= 300000 467c478bd9Sstevel@tonic-gate # include <net/if_var.h> 477c478bd9Sstevel@tonic-gate #endif 487c478bd9Sstevel@tonic-gate #include <netinet/in.h> 497c478bd9Sstevel@tonic-gate #include <netinet/in_systm.h> 507c478bd9Sstevel@tonic-gate #include <netinet/ip.h> 51ab25eeb5Syz #include <netinet/ip_icmp.h> 527c478bd9Sstevel@tonic-gate #ifndef TCP_PAWS_IDLE /* IRIX */ 537c478bd9Sstevel@tonic-gate # include <netinet/tcp.h> 547c478bd9Sstevel@tonic-gate #endif 557c478bd9Sstevel@tonic-gate #include <netinet/udp.h> 567c478bd9Sstevel@tonic-gate 577c478bd9Sstevel@tonic-gate #include <arpa/inet.h> 587c478bd9Sstevel@tonic-gate 597c478bd9Sstevel@tonic-gate #include <errno.h> 607c478bd9Sstevel@tonic-gate #include <limits.h> 617c478bd9Sstevel@tonic-gate #include <netdb.h> 627c478bd9Sstevel@tonic-gate #include <stdlib.h> 63ab25eeb5Syz #include <stddef.h> 647c478bd9Sstevel@tonic-gate #include <stdio.h> 657c478bd9Sstevel@tonic-gate #if !defined(__SVR4) && !defined(__svr4__) && defined(sun) 667c478bd9Sstevel@tonic-gate # include <strings.h> 677c478bd9Sstevel@tonic-gate #endif 687c478bd9Sstevel@tonic-gate #include <string.h> 697c478bd9Sstevel@tonic-gate #include <unistd.h> 707c478bd9Sstevel@tonic-gate 71f4b3ec61Sdh #include "netinet/ipf_stack.h" 727c478bd9Sstevel@tonic-gate #include "netinet/ip_compat.h" 737c478bd9Sstevel@tonic-gate #include "netinet/ip_fil.h" 747c478bd9Sstevel@tonic-gate #include "netinet/ip_nat.h" 757c478bd9Sstevel@tonic-gate #include "netinet/ip_frag.h" 767c478bd9Sstevel@tonic-gate #include "netinet/ip_state.h" 777c478bd9Sstevel@tonic-gate #include "netinet/ip_proxy.h" 787c478bd9Sstevel@tonic-gate #include "netinet/ip_auth.h" 797c478bd9Sstevel@tonic-gate #include "netinet/ip_lookup.h" 807c478bd9Sstevel@tonic-gate #include "netinet/ip_pool.h" 81ab25eeb5Syz #ifdef IPFILTER_SCAN 82ab25eeb5Syz #include "netinet/ip_scan.h" 83ab25eeb5Syz #endif 847c478bd9Sstevel@tonic-gate #include "netinet/ip_htable.h" 85ab25eeb5Syz #ifdef IPFILTER_SYNC 86ab25eeb5Syz #include "netinet/ip_sync.h" 877c478bd9Sstevel@tonic-gate #endif 887c478bd9Sstevel@tonic-gate 897c478bd9Sstevel@tonic-gate #include "opts.h" 907c478bd9Sstevel@tonic-gate 917c478bd9Sstevel@tonic-gate #ifndef __P 927c478bd9Sstevel@tonic-gate # ifdef __STDC__ 937c478bd9Sstevel@tonic-gate # define __P(x) x 947c478bd9Sstevel@tonic-gate # else 957c478bd9Sstevel@tonic-gate # define __P(x) () 967c478bd9Sstevel@tonic-gate # endif 977c478bd9Sstevel@tonic-gate #endif 987c478bd9Sstevel@tonic-gate #ifndef __STDC__ 997c478bd9Sstevel@tonic-gate # undef const 1007c478bd9Sstevel@tonic-gate # define const 1017c478bd9Sstevel@tonic-gate #endif 1027c478bd9Sstevel@tonic-gate 1037c478bd9Sstevel@tonic-gate #ifndef U_32_T 1047c478bd9Sstevel@tonic-gate # define U_32_T 1 1057c478bd9Sstevel@tonic-gate # if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) || \ 1067c478bd9Sstevel@tonic-gate defined(__sgi) 1077c478bd9Sstevel@tonic-gate typedef u_int32_t u_32_t; 1087c478bd9Sstevel@tonic-gate # else 1097c478bd9Sstevel@tonic-gate # if defined(__alpha__) || defined(__alpha) || defined(_LP64) 1107c478bd9Sstevel@tonic-gate typedef unsigned int u_32_t; 1117c478bd9Sstevel@tonic-gate # else 1127c478bd9Sstevel@tonic-gate # if SOLARIS2 >= 6 1137c478bd9Sstevel@tonic-gate typedef uint32_t u_32_t; 1147c478bd9Sstevel@tonic-gate # else 1157c478bd9Sstevel@tonic-gate typedef unsigned int u_32_t; 1167c478bd9Sstevel@tonic-gate # endif 1177c478bd9Sstevel@tonic-gate # endif 1187c478bd9Sstevel@tonic-gate # endif /* __NetBSD__ || __OpenBSD__ || __FreeBSD__ || __sgi */ 1197c478bd9Sstevel@tonic-gate #endif /* U_32_T */ 1207c478bd9Sstevel@tonic-gate 1217c478bd9Sstevel@tonic-gate #ifndef MAXHOSTNAMELEN 1227c478bd9Sstevel@tonic-gate # define MAXHOSTNAMELEN 256 1237c478bd9Sstevel@tonic-gate #endif 1247c478bd9Sstevel@tonic-gate 1257c478bd9Sstevel@tonic-gate #define MAX_ICMPCODE 16 1267c478bd9Sstevel@tonic-gate #define MAX_ICMPTYPE 19 1277c478bd9Sstevel@tonic-gate 1287c478bd9Sstevel@tonic-gate 1297c478bd9Sstevel@tonic-gate struct ipopt_names { 1307c478bd9Sstevel@tonic-gate int on_value; 1317c478bd9Sstevel@tonic-gate int on_bit; 1327c478bd9Sstevel@tonic-gate int on_siz; 1337c478bd9Sstevel@tonic-gate char *on_name; 1347c478bd9Sstevel@tonic-gate }; 1357c478bd9Sstevel@tonic-gate 1367c478bd9Sstevel@tonic-gate 1377c478bd9Sstevel@tonic-gate typedef struct alist_s { 1387c478bd9Sstevel@tonic-gate struct alist_s *al_next; 1397c478bd9Sstevel@tonic-gate int al_not; 1407663b816Sml sa_family_t al_family; 1417c478bd9Sstevel@tonic-gate i6addr_t al_i6addr; 1427c478bd9Sstevel@tonic-gate i6addr_t al_i6mask; 1437c478bd9Sstevel@tonic-gate } alist_t; 1447c478bd9Sstevel@tonic-gate 1457c478bd9Sstevel@tonic-gate #define al_addr al_i6addr.in4_addr 1467c478bd9Sstevel@tonic-gate #define al_mask al_i6mask.in4_addr 1477c478bd9Sstevel@tonic-gate #define al_1 al_addr 1487c478bd9Sstevel@tonic-gate #define al_2 al_mask 1497c478bd9Sstevel@tonic-gate 150ab25eeb5Syz 151ab25eeb5Syz typedef struct { 152ab25eeb5Syz u_short fb_c; 153ab25eeb5Syz u_char fb_t; 154ab25eeb5Syz u_char fb_f; 155ab25eeb5Syz u_32_t fb_k; 156ab25eeb5Syz } fakebpf_t; 157ab25eeb5Syz 158ab25eeb5Syz 1597c478bd9Sstevel@tonic-gate #if defined(__NetBSD__) || defined(__OpenBSD__) || \ 160*af5f29ddSToomas Soome (_BSDI_VERSION >= 199701) || (__FreeBSD_version >= 300000) || \ 161*af5f29ddSToomas Soome defined(SOLARIS) || defined(__sgi) || defined(__osf__) || \ 162*af5f29ddSToomas Soome defined(linux) 1637c478bd9Sstevel@tonic-gate # include <stdarg.h> 1647c478bd9Sstevel@tonic-gate typedef int (* ioctlfunc_t) __P((int, ioctlcmd_t, ...)); 1657c478bd9Sstevel@tonic-gate #else 1667c478bd9Sstevel@tonic-gate typedef int (* ioctlfunc_t) __P((dev_t, ioctlcmd_t, void *)); 1677c478bd9Sstevel@tonic-gate #endif 1687c478bd9Sstevel@tonic-gate typedef void (* addfunc_t) __P((int, ioctlfunc_t, void *)); 1697c478bd9Sstevel@tonic-gate typedef int (* copyfunc_t) __P((void *, void *, size_t)); 1707c478bd9Sstevel@tonic-gate 1717c478bd9Sstevel@tonic-gate 1727c478bd9Sstevel@tonic-gate /* 1737c478bd9Sstevel@tonic-gate * SunOS4 1747c478bd9Sstevel@tonic-gate */ 1757c478bd9Sstevel@tonic-gate #if defined(sun) && !defined(__SVR4) && !defined(__svr4__) 1767c478bd9Sstevel@tonic-gate extern int ioctl __P((int, int, void *)); 1777c478bd9Sstevel@tonic-gate #endif 1787c478bd9Sstevel@tonic-gate 1797c478bd9Sstevel@tonic-gate extern char thishost[]; 1807c478bd9Sstevel@tonic-gate extern char flagset[]; 1817c478bd9Sstevel@tonic-gate extern u_char flags[]; 1827c478bd9Sstevel@tonic-gate extern struct ipopt_names ionames[]; 1837c478bd9Sstevel@tonic-gate extern struct ipopt_names secclass[]; 1847c478bd9Sstevel@tonic-gate extern char *icmpcodes[MAX_ICMPCODE + 1]; 1857c478bd9Sstevel@tonic-gate extern char *icmptypes[MAX_ICMPTYPE + 1]; 1867c478bd9Sstevel@tonic-gate extern int use_inet6; 1877c478bd9Sstevel@tonic-gate extern int lineNum; 1887c478bd9Sstevel@tonic-gate extern struct ipopt_names v6ionames[]; 1897c478bd9Sstevel@tonic-gate 1907c478bd9Sstevel@tonic-gate 1917c478bd9Sstevel@tonic-gate extern int addicmp __P((char ***, struct frentry *, int)); 1927c478bd9Sstevel@tonic-gate extern int addipopt __P((char *, struct ipopt_names *, int, char *)); 1937c478bd9Sstevel@tonic-gate extern int addkeep __P((char ***, struct frentry *, int)); 1947c478bd9Sstevel@tonic-gate extern int bcopywrap __P((void *, void *, size_t)); 1957c478bd9Sstevel@tonic-gate extern void binprint __P((void *, size_t)); 1967c478bd9Sstevel@tonic-gate extern void initparse __P((void)); 1977c478bd9Sstevel@tonic-gate extern u_32_t buildopts __P((char *, char *, int)); 1987c478bd9Sstevel@tonic-gate extern int checkrev __P((char *)); 1997c478bd9Sstevel@tonic-gate extern int count6bits __P((u_32_t *)); 2007c478bd9Sstevel@tonic-gate extern int count4bits __P((u_32_t)); 2017c478bd9Sstevel@tonic-gate extern int extras __P((char ***, struct frentry *, int)); 2027c478bd9Sstevel@tonic-gate extern char *fac_toname __P((int)); 2037c478bd9Sstevel@tonic-gate extern int fac_findname __P((char *)); 2047c478bd9Sstevel@tonic-gate extern void fill6bits __P((int, u_int *)); 2059b4c7145Sjojemann extern int gethost __P((char *, i6addr_t *, int)); 206ab25eeb5Syz extern int getport __P((struct frentry *, char *, u_short *)); 2077c478bd9Sstevel@tonic-gate extern int getportproto __P((char *, int)); 2087c478bd9Sstevel@tonic-gate extern int getproto __P((char *)); 20923a1cceaSRoger A. Faulkner extern char *getaline __P((char *, size_t, FILE *, int *)); 2107c478bd9Sstevel@tonic-gate extern int genmask __P((char *, u_32_t *)); 211f4b3ec61Sdh extern char *getnattype __P((struct nat *, int)); 2127c478bd9Sstevel@tonic-gate extern char *getsumd __P((u_32_t)); 2137c478bd9Sstevel@tonic-gate extern u_32_t getoptbyname __P((char *)); 2147c478bd9Sstevel@tonic-gate extern u_32_t getoptbyvalue __P((int)); 2157c478bd9Sstevel@tonic-gate extern u_32_t getv6optbyname __P((char *)); 2167c478bd9Sstevel@tonic-gate extern u_32_t getv6optbyvalue __P((int)); 217ab25eeb5Syz extern void hexdump __P((FILE *, void *, int, int)); 2187c478bd9Sstevel@tonic-gate extern int icmpcode __P((char *)); 2197c478bd9Sstevel@tonic-gate extern void initparse __P((void)); 220ab25eeb5Syz extern void ipf_dotuning __P((int, char *, ioctlfunc_t)); 2217c478bd9Sstevel@tonic-gate extern void ipf_addrule __P((int, ioctlfunc_t, void *)); 2227c478bd9Sstevel@tonic-gate extern int ipf_parsefile __P((int, addfunc_t, ioctlfunc_t *, char *)); 2237c478bd9Sstevel@tonic-gate extern int ipf_parsesome __P((int, addfunc_t, ioctlfunc_t *, FILE *)); 2247c478bd9Sstevel@tonic-gate extern int ipmon_parsefile __P((char *)); 225ab25eeb5Syz extern int ipmon_parsesome __P((FILE *)); 2267c478bd9Sstevel@tonic-gate extern void ipnat_addrule __P((int, ioctlfunc_t, void *)); 2277c478bd9Sstevel@tonic-gate extern int ipnat_parsefile __P((int, addfunc_t, ioctlfunc_t, char *)); 228ab25eeb5Syz extern int ipnat_parsesome __P((int, addfunc_t, ioctlfunc_t, FILE *)); 2297c478bd9Sstevel@tonic-gate extern int ippool_parsefile __P((int, char *, ioctlfunc_t)); 230ab25eeb5Syz extern int ippool_parsesome __P((int, FILE *, ioctlfunc_t)); 2317c478bd9Sstevel@tonic-gate extern int kmemcpywrap __P((void *, void *, size_t)); 2327c478bd9Sstevel@tonic-gate extern char *kvatoname __P((ipfunc_t, ioctlfunc_t)); 2337c478bd9Sstevel@tonic-gate extern int load_hash __P((struct iphtable_s *, struct iphtent_s *, 2347c478bd9Sstevel@tonic-gate ioctlfunc_t)); 2357c478bd9Sstevel@tonic-gate extern int load_hashnode __P((int, char *, struct iphtent_s *, ioctlfunc_t)); 2367c478bd9Sstevel@tonic-gate extern int load_pool __P((struct ip_pool_s *list, ioctlfunc_t)); 2377c478bd9Sstevel@tonic-gate extern int load_poolnode __P((int, char *, ip_pool_node_t *, ioctlfunc_t)); 2387c478bd9Sstevel@tonic-gate extern int loglevel __P((char **, u_int *, int)); 2397c478bd9Sstevel@tonic-gate extern alist_t *make_range __P((int, struct in_addr, struct in_addr)); 2407c478bd9Sstevel@tonic-gate extern ipfunc_t nametokva __P((char *, ioctlfunc_t)); 2417c478bd9Sstevel@tonic-gate extern void nat_setgroupmap __P((struct ipnat *)); 2427c478bd9Sstevel@tonic-gate extern int ntomask __P((int, int, u_32_t *)); 2437c478bd9Sstevel@tonic-gate extern u_32_t optname __P((char ***, u_short *, int)); 2447c478bd9Sstevel@tonic-gate extern struct frentry *parse __P((char *, int)); 2457c478bd9Sstevel@tonic-gate extern char *portname __P((int, int)); 2467c478bd9Sstevel@tonic-gate extern int portnum __P((char *, char *, u_short *, int)); 2477c478bd9Sstevel@tonic-gate extern int ports __P((char ***, char *, u_short *, int *, u_short *, int)); 2487c478bd9Sstevel@tonic-gate extern int pri_findname __P((char *)); 2497c478bd9Sstevel@tonic-gate extern char *pri_toname __P((int)); 2507c478bd9Sstevel@tonic-gate extern void print_toif __P((char *, struct frdest *)); 251d6c23f6fSyx extern void printaddr __P((int, int, char *, u_32_t *, u_32_t *)); 2527c478bd9Sstevel@tonic-gate extern void printaps __P((ap_session_t *, int)); 2537c478bd9Sstevel@tonic-gate extern void printbuf __P((char *, int, int)); 2547c478bd9Sstevel@tonic-gate extern void printfr __P((struct frentry *, ioctlfunc_t)); 255f4b3ec61Sdh extern struct iphtable_s *printhash_live __P((struct iphtable_s *, int, char*, int)); 256f4b3ec61Sdh extern void printhashdata __P((struct iphtable_s *, int)); 257ab25eeb5Syz extern void printtunable __P((ipftune_t *)); 258ab25eeb5Syz extern struct iphtable_s *printhash __P((struct iphtable_s *, copyfunc_t, 259ab25eeb5Syz char *, int)); 2607c478bd9Sstevel@tonic-gate extern struct iphtent_s *printhashnode __P((struct iphtable_s *, 2617c478bd9Sstevel@tonic-gate struct iphtent_s *, 2627c478bd9Sstevel@tonic-gate copyfunc_t, int)); 2637c478bd9Sstevel@tonic-gate extern void printhostmask __P((int, u_32_t *, u_32_t *)); 2647c478bd9Sstevel@tonic-gate extern void printip __P((u_32_t *)); 2657c478bd9Sstevel@tonic-gate extern void printlog __P((struct frentry *)); 2667c478bd9Sstevel@tonic-gate extern void printlookup __P((i6addr_t *addr, i6addr_t *mask)); 2677663b816Sml extern void printmask __P((int, u_32_t *)); 2687c478bd9Sstevel@tonic-gate extern void printpacket __P((struct ip *)); 2697c478bd9Sstevel@tonic-gate extern void printpacket6 __P((struct ip *)); 270ab25eeb5Syz extern struct ip_pool_s *printpool __P((struct ip_pool_s *, copyfunc_t, 271ab25eeb5Syz char *, int)); 272f4b3ec61Sdh extern struct ip_pool_s *printpool_live __P((struct ip_pool_s *, int, char*, int)); 273f4b3ec61Sdh extern void printpooldata __P((struct ip_pool_s *, int)); 2747c478bd9Sstevel@tonic-gate extern struct ip_pool_node *printpoolnode __P((struct ip_pool_node *, int)); 275ab25eeb5Syz extern void printproto __P((struct protoent *, int, struct ipnat *)); 2767c478bd9Sstevel@tonic-gate extern void printportcmp __P((int, struct frpcmp *)); 2777c478bd9Sstevel@tonic-gate extern void optprint __P((u_short *, u_long, u_long)); 2787c478bd9Sstevel@tonic-gate #ifdef USE_INET6 2797c478bd9Sstevel@tonic-gate extern void optprintv6 __P((u_short *, u_long, u_long)); 2807c478bd9Sstevel@tonic-gate #endif 2817c478bd9Sstevel@tonic-gate extern int ratoi __P((char *, int *, int, int)); 2827c478bd9Sstevel@tonic-gate extern int ratoui __P((char *, u_int *, u_int, u_int)); 2837c478bd9Sstevel@tonic-gate extern int remove_hash __P((struct iphtable_s *, ioctlfunc_t)); 2847c478bd9Sstevel@tonic-gate extern int remove_hashnode __P((int, char *, struct iphtent_s *, ioctlfunc_t)); 2857c478bd9Sstevel@tonic-gate extern int remove_pool __P((ip_pool_t *, ioctlfunc_t)); 2867c478bd9Sstevel@tonic-gate extern int remove_poolnode __P((int, char *, ip_pool_node_t *, ioctlfunc_t)); 2877c478bd9Sstevel@tonic-gate extern u_char tcp_flags __P((char *, u_char *, int)); 2887c478bd9Sstevel@tonic-gate extern u_char tcpflags __P((char *)); 2897c478bd9Sstevel@tonic-gate extern void printc __P((struct frentry *)); 2907c478bd9Sstevel@tonic-gate extern void printC __P((int)); 2917c478bd9Sstevel@tonic-gate extern void emit __P((int, int, void *, struct frentry *)); 2927c478bd9Sstevel@tonic-gate extern u_char secbit __P((int)); 2937c478bd9Sstevel@tonic-gate extern u_char seclevel __P((char *)); 294ab25eeb5Syz extern void printfraginfo __P((char *, struct ipfr *)); 2957c478bd9Sstevel@tonic-gate extern void printifname __P((char *, char *, void *)); 2967c478bd9Sstevel@tonic-gate extern char *hostname __P((int, void *)); 297ab25eeb5Syz extern struct ipstate *printstate __P((struct ipstate *, int, u_long)); 2987c478bd9Sstevel@tonic-gate extern void printsbuf __P((char *)); 2997c478bd9Sstevel@tonic-gate extern void printnat __P((struct ipnat *, int)); 300d6c23f6fSyx extern void printactiveaddress __P((int, char *, i6addr_t *, char *)); 301f4b3ec61Sdh 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 309*af5f29ddSToomas Soome #ifdef 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