Diff for /embedaddon/quagga/isisd/isis_adjacency.c between versions 1.1.1.3 and 1.1.1.4

version 1.1.1.3, 2013/07/21 23:54:38 version 1.1.1.4, 2016/11/02 10:09:10
Line 52 Line 52
 extern struct isis *isis;  extern struct isis *isis;
   
 static struct isis_adjacency *  static struct isis_adjacency *
adj_alloc (u_char * id)adj_alloc (const u_char *id)
 {  {
   struct isis_adjacency *adj;    struct isis_adjacency *adj;
   
Line 63  adj_alloc (u_char * id) Line 63  adj_alloc (u_char * id)
 }  }
   
 struct isis_adjacency *  struct isis_adjacency *
isis_new_adj (u_char * id, u_char * snpa, int level,isis_new_adj (const u_char * id, const u_char * snpa, int level,
               struct isis_circuit *circuit)                struct isis_circuit *circuit)
 {  {
   struct isis_adjacency *adj;    struct isis_adjacency *adj;
Line 104  isis_new_adj (u_char * id, u_char * snpa, int level, Line 104  isis_new_adj (u_char * id, u_char * snpa, int level,
 }  }
   
 struct isis_adjacency *  struct isis_adjacency *
isis_adj_lookup (u_char * sysid, struct list *adjdb)isis_adj_lookup (const u_char * sysid, struct list *adjdb)
 {  {
   struct isis_adjacency *adj;    struct isis_adjacency *adj;
   struct listnode *node;    struct listnode *node;
Line 117  isis_adj_lookup (u_char * sysid, struct list *adjdb) Line 117  isis_adj_lookup (u_char * sysid, struct list *adjdb)
 }  }
   
 struct isis_adjacency *  struct isis_adjacency *
isis_adj_lookup_snpa (u_char * ssnpa, struct list *adjdb)isis_adj_lookup_snpa (const u_char * ssnpa, struct list *adjdb)
 {  {
   struct listnode *node;    struct listnode *node;
   struct isis_adjacency *adj;    struct isis_adjacency *adj;
Line 203  isis_adj_state_change (struct isis_adjacency *adj, enu Line 203  isis_adj_state_change (struct isis_adjacency *adj, enu
       if (dyn)        if (dyn)
         adj_name = (const char *)dyn->name.name;          adj_name = (const char *)dyn->name.name;
       else        else
        adj_name = adj->sysid ? sysid_print (adj->sysid) : "unknown";        adj_name = sysid_print (adj->sysid);
   
       zlog_info ("%%ADJCHANGE: Adjacency to %s (%s) changed from %s to %s, %s",        zlog_info ("%%ADJCHANGE: Adjacency to %s (%s) changed from %s to %s, %s",
                  adj_name,                   adj_name,
Line 314  isis_adj_print (struct isis_adjacency *adj) Line 314  isis_adj_print (struct isis_adjacency *adj)
     zlog_debug ("%s", dyn->name.name);      zlog_debug ("%s", dyn->name.name);
   
   zlog_debug ("SystemId %20s SNPA %s, level %d\nHolding Time %d",    zlog_debug ("SystemId %20s SNPA %s, level %d\nHolding Time %d",
              adj->sysid ? sysid_print (adj->sysid) : "unknown",              sysid_print (adj->sysid), snpa_print (adj->snpa),
              snpa_print (adj->snpa), adj->level, adj->hold_time);              adj->level, adj->hold_time);
   if (adj->ipv4_addrs && listcount (adj->ipv4_addrs) > 0)    if (adj->ipv4_addrs && listcount (adj->ipv4_addrs) > 0)
     {      {
       zlog_debug ("IPv4 Address(es):");        zlog_debug ("IPv4 Address(es):");
Line 377  isis_adj_print_vty (struct isis_adjacency *adj, struct Line 377  isis_adj_print_vty (struct isis_adjacency *adj, struct
   dyn = dynhn_find_by_id (adj->sysid);    dyn = dynhn_find_by_id (adj->sysid);
   if (dyn)    if (dyn)
     vty_out (vty, "  %-20s", dyn->name.name);      vty_out (vty, "  %-20s", dyn->name.name);
   else if (adj->sysid)  
     {  
       vty_out (vty, "  %-20s", sysid_print (adj->sysid));  
     }  
   else    else
    {    vty_out (vty, "  %-20s", sysid_print (adj->sysid));
      vty_out (vty, "  unknown "); 
    } 
   
   if (detail == ISIS_UI_LEVEL_BRIEF)    if (detail == ISIS_UI_LEVEL_BRIEF)
     {      {
Line 396  isis_adj_print_vty (struct isis_adjacency *adj, struct Line 390  isis_adj_print_vty (struct isis_adjacency *adj, struct
       vty_out (vty, "%-13s", adj_state2string (adj->adj_state));        vty_out (vty, "%-13s", adj_state2string (adj->adj_state));
       now = time (NULL);        now = time (NULL);
       if (adj->last_upd)        if (adj->last_upd)
        vty_out (vty, "%-9lu", adj->last_upd + adj->hold_time - now);        vty_out (vty, "%-9llu",
                  (unsigned long long)adj->last_upd + adj->hold_time - now);
       else        else
         vty_out (vty, "-        ");          vty_out (vty, "-        ");
       vty_out (vty, "%-10s", snpa_print (adj->snpa));        vty_out (vty, "%-10s", snpa_print (adj->snpa));

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


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