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


  24  */
  25 
  26 /*
  27  * DL_6TO4 MAC Type plugin for the Nemo mac module
  28  */
  29 
  30 #include <sys/modctl.h>
  31 #include <sys/dlpi.h>
  32 #include <inet/ip.h>
  33 #include <sys/mac.h>
  34 #include <sys/mac_6to4.h>
  35 #include <sys/mac_ipv4_impl.h>
  36 
  37 static struct modlmisc mac_6to4_modlmisc = {
  38         &mod_miscops,
  39         "6to4 tunneling MAC plugin"
  40 };
  41 
  42 static struct modlinkage mac_6to4_modlinkage = {
  43         MODREV_1,
  44         &mac_6to4_modlmisc,
  45         NULL
  46 };
  47 
  48 static mactype_ops_t mac_6to4_type_ops;
  49 
  50 int
  51 _init(void)
  52 {
  53         mactype_register_t *mtrp;
  54         int     err;
  55 
  56         if ((mtrp = mactype_alloc(MACTYPE_VERSION)) == NULL)
  57                 return (ENOTSUP);
  58         mtrp->mtr_ident = MAC_PLUGIN_IDENT_6TO4;
  59         mtrp->mtr_ops = &mac_6to4_type_ops;
  60         mtrp->mtr_mactype = DL_6TO4;
  61         mtrp->mtr_nativetype = DL_6TO4;
  62         mtrp->mtr_addrlen = sizeof (ipaddr_t);
  63         if ((err = mactype_register(mtrp)) == 0) {
  64                 if ((err = mod_install(&mac_6to4_modlinkage)) != 0)
  65                         (void) mactype_unregister(MAC_PLUGIN_IDENT_6TO4);




  24  */
  25 
  26 /*
  27  * DL_6TO4 MAC Type plugin for the Nemo mac module
  28  */
  29 
  30 #include <sys/modctl.h>
  31 #include <sys/dlpi.h>
  32 #include <inet/ip.h>
  33 #include <sys/mac.h>
  34 #include <sys/mac_6to4.h>
  35 #include <sys/mac_ipv4_impl.h>
  36 
  37 static struct modlmisc mac_6to4_modlmisc = {
  38         &mod_miscops,
  39         "6to4 tunneling MAC plugin"
  40 };
  41 
  42 static struct modlinkage mac_6to4_modlinkage = {
  43         MODREV_1,
  44         {   &mac_6to4_modlmisc,
  45             NULL }
  46 };
  47 
  48 static mactype_ops_t mac_6to4_type_ops;
  49 
  50 int
  51 _init(void)
  52 {
  53         mactype_register_t *mtrp;
  54         int     err;
  55 
  56         if ((mtrp = mactype_alloc(MACTYPE_VERSION)) == NULL)
  57                 return (ENOTSUP);
  58         mtrp->mtr_ident = MAC_PLUGIN_IDENT_6TO4;
  59         mtrp->mtr_ops = &mac_6to4_type_ops;
  60         mtrp->mtr_mactype = DL_6TO4;
  61         mtrp->mtr_nativetype = DL_6TO4;
  62         mtrp->mtr_addrlen = sizeof (ipaddr_t);
  63         if ((err = mactype_register(mtrp)) == 0) {
  64                 if ((err = mod_install(&mac_6to4_modlinkage)) != 0)
  65                         (void) mactype_unregister(MAC_PLUGIN_IDENT_6TO4);