aboutsummaryrefslogtreecommitdiffstats
path: root/vlib-api
AgeCommit message (Expand)AuthorFilesLines
2016-08-31VPP-210: Add "sh api status"Calvin1-3/+46
2016-08-25VPP Python language binding - plugin supportOle Troan1-0/+4
2016-08-15VPP-327 Coding standards cleanup for vppinfraDave Barach2-5/+6
2016-08-15VPP-236 Support 64-bit vector lengths, shared memory segments >4 GBDave Barach4-4/+79
2016-08-12VPP-237: indent fixes in prep for checkstyleEd Warnicke5-19/+21
2016-08-05vpp-189 Clean up more coverity warningsDave Barach1-0/+2
2016-07-27VPP-210: Clearer error codes in vlib-api for API trace saveroot1-2/+14
2016-07-27VPP-189 coverity warning cleanupsDave Barach3-0/+3
2016-07-26Fix coverity warningsDave Barach4-1/+10
2016-07-25Author: Dave Barach <dave@barachs.net>Dave Barach1-2/+4
2016-07-08fd-io-styleify passDave Barach17-3544/+4130
2016-07-08Remove unnecessary and obsolete configure.ac directivesDamjan Marion1-1/+0
2016-06-17vpp-83: fix double-unlockDave Barach1-2/+3
2016-06-07VPP-83: fix collateral damageDave Barach1-0/+1
2016-06-01VPP-83 Allow non-privileged clients to use the vpp binary API.Dave Barach5-46/+61
2016-05-21Add per-thread, per-node runtime stats serializationDave Barach4-59/+306
2016-04-26Make automake silent rules defaultDamjan Marion1-1/+1
2016-04-22Add clib_memcpy macro based on DPDK rte_memcpy implementationDamjan Marion4-11/+11
2016-04-20Python-API: Inital commit of Python bindings for the VPP API.Ole Troan2-8/+13
2016-04-19VPP-6: set epoll wait-time to zero when binary API messages are waitingDave Barach1-0/+2
2016-04-18Add support for AArch32Christophe Fontaine1-3/+3
2016-03-07build: fix call to mkdirJean-Mickael Guerin1-1/+1
2016-02-19Serialize and upload the data plane node graphDave Barach3-1/+147
2016-02-10Replace AC_PROG_LIBTOOL with LT_INITDave Barach1-1/+1
2016-01-22Enable shared-VM namespace supportDave Barach2-11/+12
2015-12-15Remove autotools generated productsDave Barach10-39229/+0
2015-12-14Move rpc handler where it belongs, related cleanupDave Barach3-22/+87
2015-12-08Initial commit of vpp code.v1.0.0Ed Warnicke30-0/+44561
ULT = 0 SR_POLICY_TYPE_SPRAY = 1 class SRv6PolicySteeringTypes(): # from src/vnet/srv6/sr.h SR_STEER_L2 = 2 SR_STEER_IPV4 = 4 SR_STEER_IPV6 = 6 class VppSRv6LocalSID(VppObject): """ SRv6 LocalSID """ def __init__(self, test, localsid, behavior, nh_addr4, nh_addr6, end_psp, sw_if_index, vlan_index, fib_table): self._test = test self.localsid = localsid # keep binary format in _localsid self.localsid["addr"] = inet_pton(AF_INET6, self.localsid["addr"]) self.behavior = behavior self.nh_addr4 = inet_pton(AF_INET, nh_addr4) self.nh_addr6 = inet_pton(AF_INET6, nh_addr6) self.end_psp = end_psp self.sw_if_index = sw_if_index self.vlan_index = vlan_index self.fib_table = fib_table self._configured = False def add_vpp_config(self): self._test.vapi.sr_localsid_add_del( self.localsid, self.behavior, self.nh_addr4, self.nh_addr6, is_del=0, end_psp=self.end_psp, sw_if_index=self.sw_if_index, vlan_index=self.vlan_index, fib_table=self.fib_table) self._configured = True def remove_vpp_config(self): self._test.vapi.sr_localsid_add_del( self.localsid, self.behavior, self.nh_addr4, self.nh_addr6, is_del=1, end_psp=self.end_psp, sw_if_index=self.sw_if_index, vlan_index=self.vlan_index, fib_table=self.fib_table) self._configured = False def query_vpp_config(self): # sr_localsids_dump API is disabled # use _configured flag for now return self._configured def object_id(self): return ("%d;%s,%d" % (self.fib_table, self.localsid, self.behavior)) class VppSRv6Policy(VppObject): """ SRv6 Policy """ def __init__(self, test, bsid, is_encap, sr_type, weight, fib_table, segments, source): self._test = test self.bsid = bsid # keep binary format in _bsid self._bsid = inet_pton(AF_INET6, bsid) self.is_encap = is_encap self.sr_type = sr_type self.weight = weight self.fib_table = fib_table self.segments = segments # keep binary format in _segments self._segments = [] for seg in segments: self._segments.extend(inet_pton(AF_INET6, seg)) self.n_segments = len(segments) # source not passed to API # self.source = inet_pton(AF_INET6, source) self.source = source self._configured = False def add_vpp_config(self): self._test.vapi.sr_policy_add( self._bsid, self.weight, self.is_encap, self.sr_type, self.fib_table, self.n_segments, self._segments) self._configured = True def remove_vpp_config(self): self._test.vapi.sr_policy_del( self._bsid) self._configured = False def query_vpp_config(self): # no API to query SR Policies # use _configured flag for now return self._configured def object_id(self): return ("%d;%s-><%s>;%d" % (self.sr_type, self.bsid, ','.join(self.segments), self.is_encap)) class VppSRv6Steering(VppObject): """ SRv6 Steering """ def __init__(self, test, bsid, prefix, mask_width, traffic_type, sr_policy_index, table_id, sw_if_index): self._test = test self.bsid = bsid # keep binary format in _bsid self._bsid = inet_pton(AF_INET6, bsid) self.prefix = prefix # keep binary format in _prefix if ':' in prefix: # IPv6 self._prefix = inet_pton(AF_INET6, prefix) else: # IPv4 # API expects 16 octets (128 bits) # last 4 octets are used for IPv4 # --> prepend 12 octets self._prefix = ('\x00' * 12) + inet_pton(AF_INET, prefix) self.mask_width = mask_width self.traffic_type = traffic_type self.sr_policy_index = sr_policy_index self.sw_if_index = sw_if_index self.table_id = table_id self._configured = False def add_vpp_config(self): self._test.vapi.sr_steering_add_del( 0, self._bsid, self.sr_policy_index, self.table_id, self._prefix, self.mask_width, self.sw_if_index, self.traffic_type) self._configured = True def remove_vpp_config(self): self._test.vapi.sr_steering_add_del( 1, self._bsid, self.sr_policy_index, self.table_id, self._prefix, self.mask_width, self.sw_if_index, self.traffic_type) self._configured = False def query_vpp_config(self): # no API to query steering entries # use _configured flag for now return self._configured def object_id(self): return ("%d;%d;%s/%d->%s" % (self.table_id, self.traffic_type, self.prefix, self.mask_width, self.bsid))