version 1.1.2.7, 2010/01/01 17:58:16
|
version 1.1.2.9, 2010/03/24 16:43:01
|
Line 1
|
Line 1
|
|
/************************************************************************* |
|
* (C) 2010 AITNET - Sofia/Bulgaria - <office@aitbg.com> |
|
* by Michael Pounov <misho@aitbg.com> |
|
* |
|
* $Author$ |
|
* $Id$ |
|
* |
|
*************************************************************************/ |
#include "global.h" |
#include "global.h" |
#include "get1steth.h" |
#include "get1steth.h" |
|
|
Line 76 int main(int argc, char **argv)
|
Line 84 int main(int argc, char **argv)
|
|
|
openlog("get1steth", LOG_CONS | LOG_PERROR, LOG_CONSOLE | LOG_USER); |
openlog("get1steth", LOG_CONS | LOG_PERROR, LOG_CONSOLE | LOG_USER); |
|
|
s = socket(AF_LOCAL, SOCK_DGRAM, 0); |
|
if (-1 == s) { |
|
syslog(LOG_ERR, "Error:: socket(LOCAL) #%d - %s\n", errno, strerror(errno)); |
|
closelog(); |
|
return 1; |
|
} |
|
if (argc) { |
if (argc) { |
strlcpy(szIface, *argv, MAX_STR); |
strlcpy(szIface, *argv, MAX_STR); |
VERB(1) syslog(LOG_NOTICE, "Info:: Get CUSTOM first interface %s\n", szIface); |
VERB(1) syslog(LOG_NOTICE, "Info:: Get CUSTOM first interface %s\n", szIface); |
Line 139 int main(int argc, char **argv)
|
Line 141 int main(int argc, char **argv)
|
syslog(LOG_ERR, "Error:: kldload(if_vlan) Can`t operate with vlans ...\n"); |
syslog(LOG_ERR, "Error:: kldload(if_vlan) Can`t operate with vlans ...\n"); |
return 1; |
return 1; |
} else |
} else |
VERB(1) syslog(LOG_NOTICE, "VLAN module ... %s\n", s ? "Loaded" : "Already loaded"); | VERB(3) syslog(LOG_NOTICE, "VLAN module ... %s\n", s ? "Loaded" : "Already loaded"); |
|
|
// create vlan |
// create vlan |
memset(&ifr, 0, sizeof ifr); |
memset(&ifr, 0, sizeof ifr); |