Diff for /embedaddon/quagga/bgpd/bgp_main.c between versions 1.1.1.1 and 1.1.1.2

version 1.1.1.1, 2012/02/21 17:26:12 version 1.1.1.2, 2012/10/09 09:22:28
Line 35  Software Foundation, Inc., 59 Temple Place - Suite 330 Line 35  Software Foundation, Inc., 59 Temple Place - Suite 330
 #include "routemap.h"  #include "routemap.h"
 #include "filter.h"  #include "filter.h"
 #include "plist.h"  #include "plist.h"
   #include "stream.h"
   
 #include "bgpd/bgpd.h"  #include "bgpd/bgpd.h"
 #include "bgpd/bgp_attr.h"  #include "bgpd/bgp_attr.h"
Line 47  Software Foundation, Inc., 59 Temple Place - Suite 330 Line 48  Software Foundation, Inc., 59 Temple Place - Suite 330
 #include "bgpd/bgp_clist.h"  #include "bgpd/bgp_clist.h"
 #include "bgpd/bgp_debug.h"  #include "bgpd/bgp_debug.h"
 #include "bgpd/bgp_filter.h"  #include "bgpd/bgp_filter.h"
   #include "bgpd/bgp_zebra.h"
   
 /* bgpd options, we use GNU getopt library. */  /* bgpd options, we use GNU getopt library. */
 static const struct option longopts[] =   static const struct option longopts[] = 
Line 54  static const struct option longopts[] =  Line 56  static const struct option longopts[] = 
   { "daemon",      no_argument,       NULL, 'd'},    { "daemon",      no_argument,       NULL, 'd'},
   { "config_file", required_argument, NULL, 'f'},    { "config_file", required_argument, NULL, 'f'},
   { "pid_file",    required_argument, NULL, 'i'},    { "pid_file",    required_argument, NULL, 'i'},
     { "socket",      required_argument, NULL, 'z'},
   { "bgp_port",    required_argument, NULL, 'p'},    { "bgp_port",    required_argument, NULL, 'p'},
   { "listenon",    required_argument, NULL, 'l'},    { "listenon",    required_argument, NULL, 'l'},
   { "vty_addr",    required_argument, NULL, 'A'},    { "vty_addr",    required_argument, NULL, 'A'},
Line 119  static zebra_capabilities_t _caps_p [] =   Line 122  static zebra_capabilities_t _caps_p [] =  
 {  {
     ZCAP_BIND,       ZCAP_BIND, 
     ZCAP_NET_RAW,      ZCAP_NET_RAW,
       ZCAP_NET_ADMIN,
 };  };
   
 struct zebra_privs_t bgpd_privs =  struct zebra_privs_t bgpd_privs =
Line 149  redistribution between different routing protocols.\n\ Line 153  redistribution between different routing protocols.\n\
 -d, --daemon       Runs in daemon mode\n\  -d, --daemon       Runs in daemon mode\n\
 -f, --config_file  Set configuration file name\n\  -f, --config_file  Set configuration file name\n\
 -i, --pid_file     Set process identifier file name\n\  -i, --pid_file     Set process identifier file name\n\
   -z, --socket       Set path of zebra socket\n\
 -p, --bgp_port     Set bgp protocol's port number\n\  -p, --bgp_port     Set bgp protocol's port number\n\
 -l, --listenon     Listen on specified address (implies -n)\n\  -l, --listenon     Listen on specified address (implies -n)\n\
 -A, --vty_addr     Set vty's bind address\n\  -A, --vty_addr     Set vty's bind address\n\
Line 196  sigint (void) Line 201  sigint (void)
   if (! retain_mode)    if (! retain_mode)
     bgp_terminate ();      bgp_terminate ();
   
     zprivs_terminate (&bgpd_privs);
   bgp_exit (0);    bgp_exit (0);
 }  }
   
Line 293  bgp_exit (int status) Line 299  bgp_exit (int status)
     zclient_free (zclient);      zclient_free (zclient);
   if (zlookup)    if (zlookup)
     zclient_free (zlookup);      zclient_free (zlookup);
     if (bgp_nexthop_buf)
       stream_free (bgp_nexthop_buf);
   
   /* reverse bgp_master_init */    /* reverse bgp_master_init */
   if (master)    if (master)
Line 335  main (int argc, char **argv) Line 343  main (int argc, char **argv)
   /* Command line argument treatment. */    /* Command line argument treatment. */
   while (1)     while (1) 
     {      {
      opt = getopt_long (argc, argv, "df:i:hp:l:A:P:rnu:g:vC", longopts, 0);      opt = getopt_long (argc, argv, "df:i:z:hp:l:A:P:rnu:g:vC", longopts, 0);
           
       if (opt == EOF)        if (opt == EOF)
         break;          break;
Line 353  main (int argc, char **argv) Line 361  main (int argc, char **argv)
         case 'i':          case 'i':
           pid_file = optarg;            pid_file = optarg;
           break;            break;
           case 'z':
             zclient_serv_path_set (optarg);
             break;
         case 'p':          case 'p':
           tmp_port = atoi (optarg);            tmp_port = atoi (optarg);
           if (tmp_port <= 0 || tmp_port > 0xffff)            if (tmp_port <= 0 || tmp_port > 0xffff)

Removed from v.1.1.1.1  
changed lines
  Added in v.1.1.1.2


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>