Diff for /embedaddon/quagga/vtysh/vtysh_config.c between versions 1.1.1.1 and 1.1.1.3

version 1.1.1.1, 2012/02/21 17:26:12 version 1.1.1.3, 2016/11/02 10:09:10
Line 47  struct config Line 47  struct config
   
 struct list *config_top;  struct list *config_top;
   
intstatic int
 line_cmp (char *c1, char *c2)  line_cmp (char *c1, char *c2)
 {  {
   return strcmp (c1, c2);    return strcmp (c1, c2);
 }  }
   
voidstatic void
 line_del (char *line)  line_del (char *line)
 {  {
   XFREE (MTYPE_VTYSH_CONFIG_LINE, line);    XFREE (MTYPE_VTYSH_CONFIG_LINE, line);
 }  }
   
struct config *static struct config *
 config_new ()  config_new ()
 {  {
   struct config *config;    struct config *config;
Line 67  config_new () Line 67  config_new ()
   return config;    return config;
 }  }
   
intstatic int
 config_cmp (struct config *c1, struct config *c2)  config_cmp (struct config *c1, struct config *c2)
 {  {
   return strcmp (c1->name, c2->name);    return strcmp (c1->name, c2->name);
 }  }
   
voidstatic void
 config_del (struct config* config)  config_del (struct config* config)
 {  {
   list_delete (config->line);    list_delete (config->line);
Line 82  config_del (struct config* config) Line 82  config_del (struct config* config)
   XFREE (MTYPE_VTYSH_CONFIG, config);    XFREE (MTYPE_VTYSH_CONFIG, config);
 }  }
   
struct config *static struct config *
 config_get (int index, const char *line)  config_get (int index, const char *line)
 {  {
   struct config *config;    struct config *config;
Line 121  config_get (int index, const char *line) Line 121  config_get (int index, const char *line)
   return config;    return config;
 }  }
   
voidstatic void
 config_add_line (struct list *config, const char *line)  config_add_line (struct list *config, const char *line)
 {  {
   listnode_add (config, XSTRDUP (MTYPE_VTYSH_CONFIG_LINE, line));    listnode_add (config, XSTRDUP (MTYPE_VTYSH_CONFIG_LINE, line));
 }  }
   
voidstatic void
 config_add_line_uniq (struct list *config, const char *line)  config_add_line_uniq (struct list *config, const char *line)
 {  {
   struct listnode *node, *nnode;    struct listnode *node, *nnode;
Line 141  config_add_line_uniq (struct list *config, const char  Line 141  config_add_line_uniq (struct list *config, const char 
   listnode_add_sort (config, XSTRDUP (MTYPE_VTYSH_CONFIG_LINE, line));    listnode_add_sort (config, XSTRDUP (MTYPE_VTYSH_CONFIG_LINE, line));
 }  }
   
voidstatic void
 vtysh_config_parse_line (const char *line)  vtysh_config_parse_line (const char *line)
 {  {
   char c;    char c;
Line 169  vtysh_config_parse_line (const char *line) Line 169  vtysh_config_parse_line (const char *line)
           if (strncmp (line, " address-family vpnv4",            if (strncmp (line, " address-family vpnv4",
               strlen (" address-family vpnv4")) == 0)                strlen (" address-family vpnv4")) == 0)
             config = config_get (BGP_VPNV4_NODE, line);              config = config_get (BGP_VPNV4_NODE, line);
             else if (strncmp (line, " address-family vpn6",
                 strlen (" address-family vpn6")) == 0)
               config = config_get (BGP_VPNV6_NODE, line);
             else if (strncmp (line, " address-family encapv6",
                 strlen (" address-family encapv6")) == 0)
               config = config_get (BGP_ENCAPV6_NODE, line);
             else if (strncmp (line, " address-family encap",
                 strlen (" address-family encap")) == 0)
               config = config_get (BGP_ENCAP_NODE, line);
           else if (strncmp (line, " address-family ipv4 multicast",            else if (strncmp (line, " address-family ipv4 multicast",
                    strlen (" address-family ipv4 multicast")) == 0)                     strlen (" address-family ipv4 multicast")) == 0)
             config = config_get (BGP_IPV4M_NODE, line);              config = config_get (BGP_IPV4M_NODE, line);

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


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