/[pengfork]/pengfork/src/tun/freebsd/tun.c
ViewVC logotype

Diff of /pengfork/src/tun/freebsd/tun.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by chupa, Tue Nov 26 01:22:31 2002 UTC revision 1.4 by chupa, Sun Dec 1 01:19:07 2002 UTC
# Line 36  Line 36 
36  #include <netinet/in_systm.h>  #include <netinet/in_systm.h>
37  #include <netinet/ip.h>  #include <netinet/ip.h>
38    
39    #include "gettext.h"
40    #include "log.h"
41  #include "tun/tun.h"  #include "tun/tun.h"
42  #include "options.h"  #include "options.h"
43    
# Line 76  tun_open () Line 78  tun_open ()
78        ioctl (tun_fd, TUNSIFHEAD, &i);        ioctl (tun_fd, TUNSIFHEAD, &i);
79      }      }
80    
81    if(!tun_ready ())    if (!tun_ready ())
82      {      {
83        if (PARAM_INTERFACE_NAME)        if (PARAM_INTERFACE_NAME)
84          {                {
85          log(LOG_ERR, "Unable to open tun device /dev/%s: %s(%d).\n",            log (LOG_ERR, gettext ("Unable to open tun device /dev/%s: %s(%d).\n"),
86              PARAM_INTERFACE_NAME, strerror(errno), errno);                 PARAM_INTERFACE_NAME, strerror (errno), errno);
87          }          }
88        else        else
89          {          {
90          log(LOG_ERR, "Unable to open a valid tun device.\n");            log (LOG_ERR, gettext ("Unable to open a valid tun device.\n"));
91          }          }
92        return 0;        return 0;
93      }      }
94      
95    return 1;    return 1;
96  }  }
97    

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26