Skip to content

Commit

Permalink
EOS SDK v2.22.5.1 (EOS 4.31.2F)
Browse files Browse the repository at this point in the history
  • Loading branch information
prufer authored and dywalsh-ar committed Jun 6, 2024
1 parent 16c2a9b commit c5281ae
Show file tree
Hide file tree
Showing 188 changed files with 4,457 additions and 5,905 deletions.
20 changes: 20 additions & 0 deletions EosSdk.i
Original file line number Diff line number Diff line change
Expand Up @@ -442,3 +442,23 @@ default_iterator(eos::intf_mgr, intf_iter);
default_iterator(eos::ip_route_mgr, ip_route_iter);
default_iterator(eos::mpls_route_mgr, mpls_route_iter);
default_iterator(eos::subintf_mgr, subintf_iter);



%{
/*
SWIG generates code for Swig::Director, that includes a static field
containing a heap-allocated python lock. If the code using that director
lock is not used here, then the lock is created, but never used, and the
compiler can eliminate the store of the constructed lock to the static
variable that holds it. Make sure there's a public path to use the lock,
so that elision doesn't happen, and we don't see the allocation as a
memory leak.
*/
[[gnu::visibility("default")]]
void _EOSSDK_SWIG_NO_ELIDE_STATICS(PyObject *pyo, void *vptr) {
Swig::Director director(pyo);
director.swig_acquire_ownership_obj(vptr, true);
}

%}
62 changes: 31 additions & 31 deletions Includes.i
Original file line number Diff line number Diff line change
Expand Up @@ -8,41 +8,41 @@
%include "eos/exception.h"
%include "eos/hash_mix.h"
%include "eos/types/eth.h"
%include "eos/panic.h"
%include "eos/types/ip.h"
%include "eos/types/acl.h"
%include "eos/types/intf.h"
%include "eos/types/bfd.h"
%include "eos/types/eth_phy_intf.h"
%include "eos/types/hardware_table.h"
%include "eos/types/lldp.h"
%include "eos/types/macsec.h"
%include "eos/panic.h"
%include "eos/types/intf.h"
%include "eos/types/ip.h"
%include "eos/types/mpls.h"
%include "eos/types/mpls_vrf_label.h"
%include "eos/types/structured_filter.h"
%include "eos/types/vrf.h"
%include "eos/types/subintf.h"
%include "eos/eth.h"
%include "eos/ip.h"
%include "eos/types/acl.h"
%include "eos/types/aresolve.h"
%include "eos/intf.h"
%include "eos/mpls.h"
%include "eos/types/bfd.h"
%include "eos/types/bgp.h"
%include "eos/types/bgp_path.h"
%include "eos/types/decap_group.h"
%include "eos/eth.h"
%include "eos/intf.h"
%include "eos/types/directflow.h"
%include "eos/types/eth_lag_intf.h"
%include "eos/mpls.h"
%include "eos/types/ip_route.h"
%include "eos/types/lldp.h"
%include "eos/types/mac_table.h"
%include "eos/types/macsec.h"
%include "eos/types/mpls_route.h"
%include "eos/types/mpls_vrf_label.h"
%include "eos/types/neighbor_table.h"
%include "eos/types/nexthop_group_tunnel.h"
%include "eos/types/structured_filter.h"
%include "eos/ip_route.h"
%include "eos/types/fib.h"
%include "eos/bfd.h"
%include "eos/types/nexthop_group.h"
%include "eos/acl.h"
%include "eos/types/policy_map.h"
%include "eos/ip_route.h"
%include "eos/types/fib.h"
%include "eos/bgp.h"
%include "eos/types/route_map.h"
%include "eos/policy_map.h"
Expand All @@ -68,18 +68,12 @@
%include "eos/timer.h"
%include "eos/hardware_table.h"
%include "eos/inline/agent.h"
%include "eos/inline/types/acl.h"
%include "eos/inline/types/bfd.h"
%include "eos/inline/types/eth.h"
%include "eos/inline/types/eth_phy_intf.h"
%include "eos/inline/types/hardware_table.h"
%include "eos/inline/types/intf.h"
%include "eos/inline/types/ip.h"
%include "eos/inline/types/lldp.h"
%include "eos/inline/types/macsec.h"
%include "eos/inline/types/mpls.h"
%include "eos/inline/types/mpls_vrf_label.h"
%include "eos/inline/types/structured_filter.h"
%include "eos/inline/types/vrf.h"
%include "eos/sdk.h"
%include "eos/vrf.h"
Expand All @@ -92,8 +86,6 @@
%include "eos/inline/types/subintf.h"
%include "eos/inline/vrf.h"
%include "eos/ip_intf.h"
%include "eos/lldp.h"
%include "eos/macsec.h"
%include "eos/mlag.h"
%include "eos/subintf.h"
%include "eos/system.h"
Expand All @@ -102,49 +94,57 @@
%include "eos/decap_group.h"
%include "eos/directflow.h"
%include "eos/eth_lag_intf.h"
%include "eos/inline/acl.h"
%include "eos/inline/bfd.h"
%include "eos/inline/eth_intf.h"
%include "eos/inline/eth_phy_intf.h"
%include "eos/inline/ip_intf.h"
%include "eos/inline/lldp.h"
%include "eos/inline/macsec.h"
%include "eos/inline/mlag.h"
%include "eos/inline/system.h"
%include "eos/inline/types/acl.h"
%include "eos/inline/types/aresolve.h"
%include "eos/inline/types/bfd.h"
%include "eos/inline/types/bgp.h"
%include "eos/inline/types/bgp_path.h"
%include "eos/inline/types/decap_group.h"
%include "eos/inline/types/directflow.h"
%include "eos/inline/types/eth_lag_intf.h"
%include "eos/inline/types/ip_route.h"
%include "eos/inline/types/lldp.h"
%include "eos/inline/types/mac_table.h"
%include "eos/inline/types/macsec.h"
%include "eos/inline/types/mpls_route.h"
%include "eos/inline/types/mpls_vrf_label.h"
%include "eos/inline/types/neighbor_table.h"
%include "eos/inline/types/nexthop_group_tunnel.h"
%include "eos/inline/types/structured_filter.h"
%include "eos/lldp.h"
%include "eos/mac_table.h"
%include "eos/macsec.h"
%include "eos/mpls_route.h"
%include "eos/mpls_vrf_label.h"
%include "eos/neighbor_table.h"
%include "eos/nexthop_group_tunnel.h"
%include "eos/inline/acl.h"
%include "eos/inline/aresolve.h"
%include "eos/inline/bfd.h"
%include "eos/inline/bgp.h"
%include "eos/inline/bgp_path.h"
%include "eos/inline/directflow.h"
%include "eos/inline/eth_lag_intf.h"
%include "eos/inline/lldp.h"
%include "eos/inline/mac_table.h"
%include "eos/inline/macsec.h"
%include "eos/inline/mpls_route.h"
%include "eos/inline/neighbor_table.h"
%include "eos/inline/nexthop_group_tunnel.h"
%include "eos/fib.h"
%include "eos/inline/types/fib.h"
%include "eos/inline/types/nexthop_group.h"
%include "eos/inline/types/policy_map.h"
%include "eos/inline/types/route_map.h"
%include "eos/nexthop_group.h"
%include "eos/fib.h"
%include "eos/route_map.h"
%include "eos/inline/fib.h"
%include "eos/inline/nexthop_group.h"
%include "eos/inline/policy_map.h"
%include "eos/inline/types/fib.h"
%include "eos/inline/types/route_map.h"
%include "eos/route_map.h"
%include "eos/class_map.h"
%include "eos/inline/fib.h"
%include "eos/inline/types/class_map.h"
35 changes: 32 additions & 3 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
lib_LTLIBRARIES = libeos.la

AM_CXXFLAGS = -fvisibility=hidden
AM_CXXFLAGS += -Wextra -Wall -Wnon-virtual-dtor -Werror -Wno-unused-parameter -Wno-error=unused-value
AM_CXXFLAGS += $(EXTRA_CFLAGS)
AM_LDFLAGS = -Wl,--no-undefined

AM_CXXFLAGS += -Wextra -Wall -Wnon-virtual-dtor -Werror -Wno-unused-parameter -Wno-error=unused-value -fPIC -fPIE -fvisibility-inlines-hidden
AM_CXXFLAGS += -DTRAFFIC_POLICY_ENABLED
AM_LDFLAGS = -Wl,--no-undefined -fPIC -fPIE

PUBLISHED_HEADER_FILES := $(wildcard eos/*.h) $(wildcard eos/inline/*.h) $(wildcard eos/types/*.h) $(wildcard eos/inline/types/*.h)
nobase_include_HEADERS = $(PUBLISHED_HEADER_FILES)
Expand Down Expand Up @@ -77,6 +77,35 @@ libeos_la_SOURCES += bgp_path.cpp
libeos_la_SOURCES += lldp.cpp
libeos_la_SOURCES += xcvr.cpp
libeos_la_SOURCES += nexthop_group_tunnel.cpp
# Add in auto generated X_gen.cpp files too.
libeos_la_SOURCES += acl_gen.cpp
libeos_la_SOURCES += bfd_gen.cpp
libeos_la_SOURCES += bgp_path_gen.cpp
libeos_la_SOURCES += bgp_gen.cpp
libeos_la_SOURCES += class_map_gen.cpp
libeos_la_SOURCES += decap_group_gen.cpp
libeos_la_SOURCES += directflow_gen.cpp
libeos_la_SOURCES += eapi_gen.cpp
libeos_la_SOURCES += eth_lag_intf_gen.cpp
libeos_la_SOURCES += eth_phy_intf_gen.cpp
libeos_la_SOURCES += fib_gen.cpp
libeos_la_SOURCES += hardware_table_gen.cpp
libeos_la_SOURCES += intf_gen.cpp
libeos_la_SOURCES += ip_route_gen.cpp
libeos_la_SOURCES += ip_gen.cpp
libeos_la_SOURCES += lldp_gen.cpp
libeos_la_SOURCES += macsec_gen.cpp
libeos_la_SOURCES += mac_table_gen.cpp
libeos_la_SOURCES += mpls_route_gen.cpp
libeos_la_SOURCES += mpls_vrf_label_gen.cpp
libeos_la_SOURCES += neighbor_table_gen.cpp
libeos_la_SOURCES += nexthop_group_tunnel_gen.cpp
libeos_la_SOURCES += nexthop_group_gen.cpp
libeos_la_SOURCES += policy_map_gen.cpp
libeos_la_SOURCES += route_map_gen.cpp
libeos_la_SOURCES += structured_filter_gen.cpp
libeos_la_SOURCES += subintf_gen.cpp
libeos_la_SOURCES += vrf_gen.cpp

libeos_la_CPPFLAGS = $(AM_CPPFLAGS) $(SHIPPING_FLAG) -fPIC -fPIE
libeos_la_LDFLAGS = -version-info $(SDK_LIBTOOL_VERSION) -lrt
Expand Down
9 changes: 8 additions & 1 deletion SdkImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ INIT_STUB_MGR(eth_phy_intf_counter_mgr)
INIT_STUB_MGR(eth_lag_intf_mgr)
INIT_STUB_MGR(hardware_table_mgr)
INIT_STUB_MGR(intf_mgr)
INIT_STUB_MGR(intf_counter_mgr)
INIT_STUB_MGR(ip_intf_mgr)
INIT_STUB_MGR(ip_route_mgr)
INIT_STUB_MGR(lldp_mgr)
Expand Down Expand Up @@ -141,6 +140,14 @@ void sdk::SdkImpl::init_fib_mgr(mgr_mode_type_t mode) {
// TODO: No op impl.
}

// Explicit definition for counter manager init with arguments
intf_counter_mgr * new_intf_counter_mgr();
void sdk::SdkImpl::init_intf_counter_mgr( mgr_mode_type_t ) {
if(!intf_counter_mgr_) {
intf_counter_mgr_ = new_intf_counter_mgr();
}
}

void sdk::SdkImpl::init_mount_mgr() {
// BUG86400 - Not a public function
}
Expand Down
20 changes: 18 additions & 2 deletions SdkImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class EOS_SDK_PUBLIC sdk::SdkImpl {
void init_fib_mgr(mgr_mode_type_t mode=MODE_TYPE_READ_ONLY);
void init_hardware_table_mgr();
void init_intf_mgr();
void init_intf_counter_mgr();
void init_intf_counter_mgr(mgr_mode_type_t mode=MODE_TYPE_READ_ONLY);
void init_ip_intf_mgr();
void init_ip_route_mgr();
void init_lldp_mgr();
Expand Down Expand Up @@ -166,6 +166,7 @@ class EOS_SDK_PUBLIC sdk::SdkImpl {
hardware_table_mgr * get_hardware_table_mgr();
intf_mgr * get_intf_mgr();
intf_counter_mgr * get_intf_counter_mgr();
intf_counter_mgr * get_intf_counter_mgr(mgr_mode_type_t mode);
ip_intf_mgr * get_ip_intf_mgr();
ip_route_mgr * get_ip_route_mgr();
lldp_mgr * get_lldp_mgr();
Expand Down Expand Up @@ -235,6 +236,7 @@ class EOS_SDK_PUBLIC sdk::SdkImpl {

std::string name_;
void * eossdk_context_;
mgr_mode_type_t intf_counter_mgr_init_mode_;

friend class mount_mgr;
};
Expand Down Expand Up @@ -367,9 +369,23 @@ inline intf_mgr * sdk::SdkImpl::get_intf_mgr() {
}

inline intf_counter_mgr * sdk::SdkImpl::get_intf_counter_mgr() {
if ( !intf_counter_mgr_ ) {
get_intf_counter_mgr( MODE_TYPE_READ_ONLY ) ;
}
return intf_counter_mgr_;
}

inline intf_counter_mgr * sdk::SdkImpl::get_intf_counter_mgr(
mgr_mode_type_t mode ) {
eos::print_profiles::add_profile( "IntfMgrHelper" );
eos::print_profiles::add_profile( "intf" );
GET_NO_MOUNT_MGR(intf_counter)
if ( !intf_counter_mgr_ ) {
intf_counter_mgr_init_mode_ = mode;
init_intf_counter_mgr( mode ) ;
} else if ( intf_counter_mgr_init_mode_ != mode ) {
panic( "Requested manager mode is different than mode on initialization" );
}
return intf_counter_mgr_;
}

inline ip_intf_mgr * sdk::SdkImpl::get_ip_intf_mgr() {
Expand Down
Loading

0 comments on commit c5281ae

Please sign in to comment.