onep_interface_status_to_string gives strange results

Document created by cdnadmin on Jan 25, 2014
Version 1Show Document
  • View in full screen mode
This document was generated from CDN thread

Created by: Viktor S. Wold Eide on 27-06-2013 08:19:57 AM
When running the application sample-apps/HelloNetwork it seems like the onep function onep_interface_status_to_string gives strange results. As can be seen below, GigabitEthernet0/0 is up, but the information reported by the onep_interface_status_to_string function does not seem correct / correct type (ONEP_IF_VLAN_ENCAP_DOT1Q_NONE) ?

OnePK-2#show ip interface brief
Interface                  IP-Address      OK? Method Status                Protocol
Embedded-Service-Engine0/0 unassigned      YES NVRAM  administratively down down   
GigabitEthernet0/0         10.0.100.12     YES NVRAM  up                    up     
GigabitEthernet0/1         10.0.227.12     YES NVRAM  down                  down   
GigabitEthernet0/2         10.0.225.12     YES NVRAM  up                    up     
OnePK-2#


./HelloNetwork -a 10.0.225.12 -u user1 -p x

 *************** Start ***************


 --- NetworkElement toString
NetworkElement [ 10.0.225.12 ]
        Product ID   : CISCO2951/K9
        Processor    : unknown processor
        Serial No    : FCZ154920DH
        sysName      : OnePK-2
        sysUpTime    : 1877
        sysDescr     : Cisco IOS Software, C2951 Software (C2951-UNIVERSALK9-M), Version 15.3(2)T, RELEASE SOFTWARE (fc3)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2013 by Cisco Systems, Inc.
Compiled Thu 28-Mar-13 13:17 by prod_rel_team
 --
 --- ElementProperty toString
ElementProperty [ 10.0.225.12 ]
        Product ID   : CISCO2951/K9
        Processor    : unknown processor
        Serial No    : FCZ154920DH
        sysName      : OnePK-2
        sysUpTime    : 1877
        sysDescr     : Cisco IOS Software, C2951 Software (C2951-UNIVERSALK9-M), Version 15.3(2)T, RELEASE SOFTWARE (fc3)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2013 by Cisco Systems, Inc.
Compiled Thu 28-Mar-13 13:17 by prod_rel_team
 ---
 --- SessionHandle toString
SessionHandle [4646]
        NetworkElement   : 10.0.225.12
        SessionProperty  :
          thread pool    : 10
          queue Size     : 200
          drop mode      : New
          reconnect timer: 0
          username       : user1
          transport mode : SOCKET
          transport port : 15001
        SessionStatistics:
          event drop count: 0
          event recv count: 0
 ---
time:0
 get interface list :0
time:0

InterfaceStatus [ Embedded-Service-Engine0/0 ]
        LinkState        : ONEP_IF_STATE_ADMIN_DOWN
        LineProtoState   : ONEP_IF_STATE_OPER_UP

time:0

InterfaceStatus [ GigabitEthernet0/0 ]
        LinkState        : ONEP_IF_VLAN_ENCAP_DOT1Q_NONE
        LineProtoState   : ONEP_IF_VLAN_ENCAP_DOT1Q_NONE

 Addr = 10.0.100.12
time:0
        Interface Statistics:
                 Cumulative bytes:: 32470
                 Broadcast Packets:: 237
                 Multicast Packets:: 235
                 Dropped Packets:: 0
                 Rx Error Packets:: 0
                 Unknown protocol Packets: 0
                 Tx Cumulative Bytes: 44411
                 Tx Dropped Packets: 0
                 Tx Error Packets: 0
 print stats loop :3
 Got list of interfaces : total 4
 Skipped : 1
 Count of interfaces down: 1
 Interface list time: 0, status: 0, stats: 0
 Monitoring all interfaces for up/down events
 Monitoring all interfaces for create/delete events
 Entire sample program :513


Subject: RE: onep_interface_status_to_string gives strange results
Replied by: Joseph Clarke on 30-06-2013 07:38:38 PM
This is a bug where the application layer got out of sync with the network element layer during controlled availability.  Essentially, the device sends a numeric value of "4" for an interface that is up.  However, the array is numbered 0 through 3.  The result is an invalid access in memory.  This has been fixed in CSCue51248 and will be available in the GA release.

Attachments

    Outcomes