Print this page
fixup .text where possible
7127  remove -Wno-missing-braces from Makefile.uts


  41 dev_info_t      *iptun_dip;
  42 ldi_ident_t     iptun_ldi_ident;
  43 
  44 static int      iptun_attach(dev_info_t *, ddi_attach_cmd_t);
  45 static int      iptun_detach(dev_info_t *, ddi_detach_cmd_t);
  46 static int      iptun_getinfo(dev_info_t *, ddi_info_cmd_t, void *, void **);
  47 static int      iptun_constructor(void *, void *, int);
  48 static void     iptun_destructor(void *, void *);
  49 
  50 DDI_DEFINE_STREAM_OPS(iptun_dev_ops, nulldev, nulldev, iptun_attach,
  51     iptun_detach, nodev, iptun_getinfo, D_MP, NULL, ddi_quiesce_not_supported);
  52 
  53 static struct modldrv iptun_modldrv = {
  54         &mod_driverops,
  55         IPTUN_LINKINFO,
  56         &iptun_dev_ops
  57 };
  58 
  59 static struct modlinkage iptun_modlinkage = {
  60         MODREV_1,
  61         &iptun_modldrv,
  62         NULL
  63 };
  64 
  65 /*
  66  * Initialize the tunnel stack instance.
  67  */
  68 /* ARGSUSED */
  69 static void *
  70 iptun_stack_init(netstackid_t stackid, netstack_t *ns)
  71 {
  72         iptun_stack_t   *iptuns;
  73 
  74         iptuns = kmem_zalloc(sizeof (*iptuns), KM_SLEEP);
  75         iptuns->iptuns_netstack = ns;
  76         mutex_init(&iptuns->iptuns_lock, NULL, MUTEX_DEFAULT, NULL);
  77         list_create(&iptuns->iptuns_iptunlist, sizeof (iptun_t),
  78             offsetof(iptun_t, iptun_link));
  79 
  80         return (iptuns);
  81 }
  82 




  41 dev_info_t      *iptun_dip;
  42 ldi_ident_t     iptun_ldi_ident;
  43 
  44 static int      iptun_attach(dev_info_t *, ddi_attach_cmd_t);
  45 static int      iptun_detach(dev_info_t *, ddi_detach_cmd_t);
  46 static int      iptun_getinfo(dev_info_t *, ddi_info_cmd_t, void *, void **);
  47 static int      iptun_constructor(void *, void *, int);
  48 static void     iptun_destructor(void *, void *);
  49 
  50 DDI_DEFINE_STREAM_OPS(iptun_dev_ops, nulldev, nulldev, iptun_attach,
  51     iptun_detach, nodev, iptun_getinfo, D_MP, NULL, ddi_quiesce_not_supported);
  52 
  53 static struct modldrv iptun_modldrv = {
  54         &mod_driverops,
  55         IPTUN_LINKINFO,
  56         &iptun_dev_ops
  57 };
  58 
  59 static struct modlinkage iptun_modlinkage = {
  60         MODREV_1,
  61         {   &iptun_modldrv,
  62             NULL }
  63 };
  64 
  65 /*
  66  * Initialize the tunnel stack instance.
  67  */
  68 /* ARGSUSED */
  69 static void *
  70 iptun_stack_init(netstackid_t stackid, netstack_t *ns)
  71 {
  72         iptun_stack_t   *iptuns;
  73 
  74         iptuns = kmem_zalloc(sizeof (*iptuns), KM_SLEEP);
  75         iptuns->iptuns_netstack = ns;
  76         mutex_init(&iptuns->iptuns_lock, NULL, MUTEX_DEFAULT, NULL);
  77         list_create(&iptuns->iptuns_iptunlist, sizeof (iptun_t),
  78             offsetof(iptun_t, iptun_link));
  79 
  80         return (iptuns);
  81 }
  82