--- embedtools/src/get1steth.c 2010/03/23 13:29:38 1.1.2.8 +++ embedtools/src/get1steth.c 2011/06/08 09:27:55 1.1.2.10 @@ -1,3 +1,11 @@ +/************************************************************************* + * (C) 2010 AITNET - Sofia/Bulgaria - + * by Michael Pounov + * + * $Author: misho $ + * $Id: get1steth.c,v 1.1.2.10 2011/06/08 09:27:55 misho Exp $ + * + *************************************************************************/ #include "global.h" #include "get1steth.h" @@ -17,6 +25,7 @@ static void Usage() "\n", compiled, compiledby, compilehost); } +#ifdef HAVE_KLDNEXT static int kldLoad() { struct module_stat mstat; @@ -43,6 +52,7 @@ static int kldLoad() return 1; } +#endif // ------------------------------- @@ -74,7 +84,7 @@ int main(int argc, char **argv) argc -= optind; argv += optind; - openlog("get1steth", LOG_CONS | LOG_PERROR, LOG_CONSOLE | LOG_USER); + openlog("get1steth", LOG_CONS | LOG_PERROR, LOG_USER); if (argc) { strlcpy(szIface, *argv, MAX_STR); @@ -128,12 +138,14 @@ int main(int argc, char **argv) return 0; } +#ifdef HAVE_KLDNEXT s = kldLoad(); if (s == -1) { syslog(LOG_ERR, "Error:: kldload(if_vlan) Can`t operate with vlans ...\n"); return 1; } else VERB(3) syslog(LOG_NOTICE, "VLAN module ... %s\n", s ? "Loaded" : "Already loaded"); +#endif // create vlan memset(&ifr, 0, sizeof ifr);