from trex.astf.api import * from trex.astf.tunnels_topo import TunnelsTopo def get_topo(): topo = TunnelsTopo() topo.add_tunnel_ctx( src_start = '192.168.0.2', src_end = '192.168.0.2', initial_teid = 1, teid_jump = 1, sport = 5000, version = 4, tunnel_type = 1, src_ip = '172.16.32.2', dst_ip = '172.16.32.1', activate = True ) # topo.add_tunnel_ctx( # src_start = '16.0.1.0', # src_end = '16.0.1.255', # initial_teid = 256, # teid_jump = 6, # sport = 4000, # version = 6, # tunnel_type = 1, # src_ip = '2001:db8:3333:4444:5555:6666:7777:8888', # dst_ip = '2001:db8:3333:4444:CCCC:DDDD:EEEE:FFFF', # activate = False # ) return topo