Diff for /embedaddon/mpd/src/iface.c between versions 1.1.1.5 and 1.1.1.5.2.1

version 1.1.1.5, 2021/03/17 00:39:23 version 1.1.1.5.2.1, 2023/09/27 11:08:00
Line 64 Line 64
   
 #include <string.h>  #include <string.h>
   
   #ifdef SIOCSIFDESCR
   #include <time.h>
   #endif
   
 /*  /*
  * DEFINITIONS   * DEFINITIONS
  */   */
Line 1110  IfaceIpIfaceUp(Bund b, int ready) Line 1114  IfaceIpIfaceUp(Bund b, int ready)
             u_addrtoa(&iface->peer_addr, peerbuf, sizeof(peerbuf)),               u_addrtoa(&iface->peer_addr, peerbuf, sizeof(peerbuf)), 
             *b->params.authname ? b->params.authname : "-",               *b->params.authname ? b->params.authname : "-", 
             ns1buf, ns2buf, *b->params.peeraddr ? b->params.peeraddr : "-",              ns1buf, ns2buf, *b->params.peeraddr ? b->params.peeraddr : "-",
            b->params.filter_id ? b->params.filter_id : "-");#ifdef USE_RADIUS
             b->params.filter_id ? b->params.filter_id :
 #endif
             "-");
         if (res != 0) {          if (res != 0) {
             FsmFailure(&b->ipcp.fsm, FAIL_NEGOT_FAILURE);              FsmFailure(&b->ipcp.fsm, FAIL_NEGOT_FAILURE);
             return (-1);              return (-1);
Line 1142  IfaceIpIfaceDown(Bund b) Line 1149  IfaceIpIfaceDown(Bund b)
             u_addrtoa(&iface->peer_addr, peerbuf, sizeof(peerbuf)),               u_addrtoa(&iface->peer_addr, peerbuf, sizeof(peerbuf)), 
             *b->params.authname ? b->params.authname : "-",              *b->params.authname ? b->params.authname : "-",
             *b->params.peeraddr ? b->params.peeraddr : "-",              *b->params.peeraddr ? b->params.peeraddr : "-",
            b->params.filter_id ? b->params.filter_id : "-");#ifdef USE_RADIUS
             b->params.filter_id ? b->params.filter_id :
 #endif
             "-");
     }      }
   
     /* Delete dynamic routes */      /* Delete dynamic routes */
Line 1254  IfaceIpv6IfaceUp(Bund b, int ready) Line 1264  IfaceIpv6IfaceUp(Bund b, int ready)
             u_addrtoa(&iface->peer_ipv6_addr, peerbuf, sizeof(peerbuf)), iface->ifname,               u_addrtoa(&iface->peer_ipv6_addr, peerbuf, sizeof(peerbuf)), iface->ifname, 
             *b->params.authname ? b->params.authname : "-",              *b->params.authname ? b->params.authname : "-",
             *b->params.peeraddr ? b->params.peeraddr : "-",              *b->params.peeraddr ? b->params.peeraddr : "-",
            b->params.filter_id ? b->params.filter_id : "-");#ifdef USE_RADIUS
             b->params.filter_id ? b->params.filter_id :
 #endif
             "-");
         if (res != 0) {          if (res != 0) {
             FsmFailure(&b->ipv6cp.fsm, FAIL_NEGOT_FAILURE);              FsmFailure(&b->ipv6cp.fsm, FAIL_NEGOT_FAILURE);
             return (-1);              return (-1);
Line 1287  IfaceIpv6IfaceDown(Bund b) Line 1300  IfaceIpv6IfaceDown(Bund b)
             u_addrtoa(&iface->peer_ipv6_addr, peerbuf, sizeof(peerbuf)), iface->ifname,               u_addrtoa(&iface->peer_ipv6_addr, peerbuf, sizeof(peerbuf)), iface->ifname, 
             *b->params.authname ? b->params.authname : "-",              *b->params.authname ? b->params.authname : "-",
             *b->params.peeraddr ? b->params.peeraddr : "-",              *b->params.peeraddr ? b->params.peeraddr : "-",
            b->params.filter_id ? b->params.filter_id : "-");#ifdef USE_RADIUS
             b->params.filter_id ? b->params.filter_id :
 #endif
             "-");
     }      }
   
     /* Delete dynamic routes */      /* Delete dynamic routes */
Line 3812  IfaceSetName(Bund b, const char * ifname) Line 3828  IfaceSetName(Bund b, const char * ifname)
  * %o for local outer ("physical") address of bundle's first link   * %o for local outer ("physical") address of bundle's first link
  * %O for peer outer ("physical") address of bundle's first link   * %O for peer outer ("physical") address of bundle's first link
  * %P for peer outer ("physical") port of bundle's first link   * %P for peer outer ("physical") port of bundle's first link
    * %s for last interface description change time, in unixtime (seconds)
  * %S for interface status (DoD/UP/DOWN)   * %S for interface status (DoD/UP/DOWN)
  * %t for type of bundle's first link (pppoe, pptp, l2tp etc.)   * %t for type of bundle's first link (pppoe, pptp, l2tp etc.)
  * %u for self auth name (or dash if self auth name not used)   * %u for self auth name (or dash if self auth name not used)
Line 3971  IfaceSetDescr(Bund b, const char * template) Line 3988  IfaceSetDescr(Bund b, const char * template)
             } else {              } else {
                 DST_COPY("-");                  DST_COPY("-");
             }              }
               break;
             /* timestamp of interface description change */
             case 's':
               snprintf(buf, sizeof(buf), "%jd", (intmax_t)time(NULL));
               DST_COPY(buf);
             break;              break;
           /* interface status */            /* interface status */
           case 'S':            case 'S':

Removed from v.1.1.1.5  
changed lines
  Added in v.1.1.1.5.2.1


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