solaris.c revision 193974072f41a843678abf5f61979c748687e66b
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Copyright (C) 1993-2001, 2003 by Darren Reed.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * See the IPFILTER.LICENCE file for details on licencing.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Use is subject to license terms.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int iplwrite __P((dev_t, struct uio *, cred_t *));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic int ipf_getinfo __P((dev_info_t *, ddi_info_cmd_t,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte void *, void **));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic int ipf_attach __P((dev_info_t *, ddi_attach_cmd_t));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic int ipf_detach __P((dev_info_t *, ddi_detach_cmd_t));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void *ipf_stack_create __P((const netid_t));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void ipf_stack_destroy __P((const netid_t, void *));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic int ipf_property_g_update __P((dev_info_t *));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic char *ipf_devfiles[] = { IPL_NAME, IPNAT_NAME, IPSTATE_NAME,
NULL,
(struct bus_ops *)0,
NULL,
{ IFT_OTHER, 0 },
{ IFT_1822, 0 },
{ IFT_HDH1822, 0 },
{ IFT_X25DDN, 0 },
{ IFT_X25, 0 },
{ IFT_ISO88023, 0 },
{ IFT_ISO88024, 0 },
{ IFT_ISO88025, 0 },
{ IFT_ISO88026, 0 },
{ IFT_STARLAN, 0 },
{ IFT_P10, 0 },
{ IFT_P80, 0 },
{ IFT_HY, 0 },
{ IFT_LAPB, 0 },
{ IFT_SDLC, 0 },
{ IFT_T1, 0 },
{ IFT_CEPT, 0 },
{ IFT_ISDNBASIC, 0 },
{ IFT_ISDNPRIMARY, 0 },
{ IFT_PTPSERIAL, 0 },
{ IFT_PPP, 0 },
{ IFT_LOOP, 0 },
{ IFT_EON, 0 },
{ IFT_XETHER, 0 },
{ IFT_NSIP, 0 },
{ IFT_SLIP, 0 },
{ IFT_ULTRA, 0 },
{ IFT_DS3, 0 },
{ IFT_SIP, 0 },
{ IFT_FRELAY, 0 },
{ IFT_RS232, 0 },
{ IFT_PARA, 0 },
{ IFT_ARCNET, 0 },
{ IFT_ARCNETPLUS, 0 },
{ IFT_ATM, 0 },
{ IFT_MIOX25, 0 },
{ IFT_SONET, 0 },
{ IFT_X25PLE, 0 },
{ IFT_ISO88022LLC, 0 },
{ IFT_LOCALTALK, 0 },
{ IFT_SMDSDXI, 0 },
{ IFT_FRELAYDCE, 0 },
{ IFT_V35, 0 },
{ IFT_HSSI, 0 },
{ IFT_HIPPI, 0 },
{ IFT_MODEM, 0 },
{ IFT_AAL5, 0 },
{ IFT_SONETPATH, 0 },
{ IFT_SONETVT, 0 },
{ IFT_SMDSICIP, 0 },
{ IFT_PROPVIRTUAL, 0 },
{ IFT_PROPMUX, 0 },
sizeof (filter_kstats_t));
sizeof (filter_kstats_t));
#ifdef IPFDEBUG
return (EIO);
return (EACCES);
_init()
int ipfinst;
#ifdef IPFDEBUG
return (ipfinst);
_fini(void)
int ipfinst;
#ifdef IPFDEBUG
return (ipfinst);
int ipfinst;
#ifdef IPFDEBUG
return (ipfinst);
#ifdef IPFDEBUG
return (DDI_IDENTIFIED);
return (DDI_NOT_IDENTIFIED);
#ifdef IPFDEBUG
#ifdef IPFDEBUG
return (ifs);
return (ifs);
static int ipf_detach_check_all()
#ifdef IPFDEBUG
int instance;
#ifdef IPFDEBUG
switch (cmd)
case DDI_ATTACH:
if (instance > 0)
return (DDI_FAILURE);
#ifdef IPFDEBUG
if (s == NULL)
DDI_PSEUDO, 0) ==
DDI_FAILURE) {
goto attach_failed;
#ifdef IPFDEBUG
return (DDI_SUCCESS);
return (DDI_FAILURE);
#ifdef IPFDEBUG
switch (cmd) {
case DDI_DETACH:
if (ipf_detach_check_all() != 0)
return (DDI_FAILURE);
return (DDI_FAILURE);
return (DDI_SUCCESS);
return (DDI_FAILURE);
int error;
#ifdef IPFDEBUG
switch (infocmd) {
case DDI_INFO_DEVT2DEVINFO:
case DDI_INFO_DEVT2INSTANCE:
*result = (void *)0;
return (error);
* Fetch configuration file values that have been entered into the ipf.conf
#ifdef DDI_NO_AUTODETACH
return (DDI_FAILURE);
return (DDI_FAILURE);
return (DDI_SUCCESS);
char *name;
int *i32p;
int err;
ipft++) {
#ifdef IPFDEBUG
return (err);
#ifdef IPFDEBUG
return (err);
return (err);