aboutsummaryrefslogtreecommitdiffstats
path: root/bootstrap.sh
AgeCommit message (Expand)AuthorFilesLines
2017-02-09Enable to pass vpp pacakges to VIRL in case of vpp patchJan Gelety1-2/+2
2017-01-27Add Centos specific bootstrap files.Thomas F Herbert1-366/+3
2017-01-25Remove _base from test suite dir namesJan Gelety1-1/+1
2017-01-24Correction of dpdk packages download when vpp deb packages providedJan Gelety1-5/+4
2017-01-24csit-func-tc-naming-change - phase 1Jan Gelety1-1/+1
2017-01-23Update of VPP_STABLE_VERJan Gelety1-2/+7
2017-01-02CSIT-488 TLDK jbb validation jobs need cmake installedpmikus1-1/+1
2016-12-12Correct the checking of return values.Tibor Frank1-3/+3
2016-11-30CSIT-467 Add libpcap-dev packages to VIRL imagepmikus1-1/+1
2016-10-14CSIT-351: Testing Ubuntu 16.04.1 changespmikus1-1/+4
2016-10-08Switch VIRL image version to 1.3pmikus1-1/+1
2016-10-03CSIT-235: Switched Port Analyzer mirroring (SPAN) - IPv4selias1-1/+1
2016-09-25Use tmp directory for log filesJan Gelety1-4/+8
2016-09-20CSIT-360: Parallel test sets runJan Gelety1-83/+247
2016-09-12CSIT-383: IPSEC IPv4 negative test casesJan Gelety1-1/+1
2016-08-29Update of VPP_STABLE_VERJan Gelety1-7/+8
2016-08-25CSIT-28: IPSEC basic conectivity test - IPv4Jan Gelety1-1/+1
2016-08-15CSIT-226: Install vpp-plugins deb package on DUTMatej Klotton1-0/+1
2016-07-22CSIT-220: Rename directories in tests directoryMatej Klotton1-1/+2
2016-07-01TEST: PERF pybot output set width to 150 charactersMiroslav Miklus1-1/+1
2016-06-29CSIT-181: Remove fds tests from vpp-csit-verify and csit-vpp-verify jobsJan Gelety1-0/+1
2016-06-17Use common file names to store VPP stable build data in branchesJan Gelety1-5/+4
2016-06-10Use files to store VPP stable build dataJan Gelety1-6/+7
2016-06-02CSIT-128: Remove EXPECTED_FAILING tag from VXLAN over IPv6 test casesJan Gelety1-1/+1
2016-06-02CSIT-114: Eliminate repeated download of PIP packagesCarsten Koester1-1/+1
2016-05-31CSIT-98: MAC split-horizon group, part IIJan Gelety1-2/+2
2016-05-16Add VIRL host selection mechanism to bootstrapCarsten Koester1-12/+52
2016-05-16CSIT-18: Add GRE tunnel libraries and tests.Matej Klotton1-1/+1
2016-05-05VPP build update for lisp testsJan Gelety1-1/+1
2016-04-27Update vpp version in bootstrap.shJan Gelety1-6/+8
2016-04-21Topology schemaTibor Frank1-0/+11
2016-04-15Update of bootstrap.sh file.Jan Gelety1-9/+9
2016-03-29Fix of bootstrap.sh for vpp-csit-verify-virl jobJan Gelety1-23/+1
2016-03-11Update VPP version downloaded from Nexus.Matej Klotton1-7/+6
2016-03-07Modify sweep ping test casesJuraj Sloboda1-3/+2
2016-03-07Add with-statment support to VatTerminal.Matej Klotton1-1/+13
2016-03-01Install dependencies prior test execution.Stefan Kobza1-8/+22
2016-02-29Add VXLAN testMatej Klotton1-0/+1
2016-02-23Automate VIRL simulation life cycle.Stefan Kobza1-6/+119
2016-02-19Add hw/vm tags, add single link tag.Stefan Kobza1-2/+7
2016-02-18Cleanup bootstrap.sh.Stefan Kobza1-72/+5
2016-02-17Test VIRL connection.Stefan Kobza1-31/+81
2016-02-11Update of latest tests.Stefan Kobza1-12/+14
2016-02-08New version of RF tests.Stefan Kobza1-0/+51
class="p">: "client_id", 64: "NISplus_domain", 65: IPField("NISplus_server","0.0.0.0"), 69: IPField("SMTP_server","0.0.0.0"), 70: IPField("POP3_server","0.0.0.0"), 71: IPField("NNTP_server","0.0.0.0"), 72: IPField("WWW_server","0.0.0.0"), 73: IPField("Finger_server","0.0.0.0"), 74: IPField("IRC_server","0.0.0.0"), 75: IPField("StreetTalk_server","0.0.0.0"), 76: "StreetTalk_Dir_Assistance", 82: "relay_agent_Information", 53: ByteEnumField("message-type", 1, DHCPTypes), # 55: DHCPRequestListField("request-list"), 255: "end" } DHCPRevOptions = {} for k,v in DHCPOptions.iteritems(): if type(v) is str: n = v v = None else: n = v.name DHCPRevOptions[n] = (k,v) del(n) del(v) del(k) class RandDHCPOptions(RandField): def __init__(self, size=None, rndstr=None): if size is None: size = RandNumExpo(0.05) self.size = size if rndstr is None: rndstr = RandBin(RandNum(0,255)) self.rndstr=rndstr self._opts = DHCPOptions.values() self._opts.remove("pad") self._opts.remove("end") def _fix(self): op = [] for k in range(self.size): o = random.choice(self._opts) if type(o) is str: op.append((o,self.rndstr*1)) else: op.append((o.name, o.randval()._fix())) return op class DHCPOptionsField(StrField): islist=1 def i2repr(self,pkt,x): s = [] for v in x: if type(v) is tuple and len(v) >= 2: if DHCPRevOptions.has_key(v[0]) and isinstance(DHCPRevOptions[v[0]][1],Field): f = DHCPRevOptions[v[0]][1] vv = ",".join(f.i2repr(pkt,val) for val in v[1:]) else: vv = ",".join(repr(val) for val in v[1:]) r = "%s=%s" % (v[0],vv) s.append(r) else: s.append(sane(v)) return "[%s]" % (" ".join(s)) def getfield(self, pkt, s): return "", self.m2i(pkt, s) def m2i(self, pkt, x): opt = [] while x: o = ord(x[0]) if o == 255: opt.append("end") x = x[1:] continue if o == 0: opt.append("pad") x = x[1:] continue if len(x) < 2 or len(x) < ord(x[1])+2: opt.append(x) break elif DHCPOptions.has_key(o): f = DHCPOptions[o] if isinstance(f, str): olen = ord(x[1]) opt.append( (f,x[2:olen+2]) ) x = x[olen+2:] else: olen = ord(x[1]) lval = [f.name] try: left = x[2:olen+2] while left: left, val = f.getfield(pkt,left) lval.append(val) except: opt.append(x) break else: otuple = tuple(lval) opt.append(otuple) x = x[olen+2:] else: olen = ord(x[1]) opt.append((o, x[2:olen+2])) x = x[olen+2:] return opt def i2m(self, pkt, x): if type(x) is str: return x s = "" for o in x: if type(o) is tuple and len(o) >= 2: name = o[0] lval = o[1:] if isinstance(name, int): onum, oval = name, "".join(lval) elif DHCPRevOptions.has_key(name): onum, f = DHCPRevOptions[name] if f is not None: lval = [f.addfield(pkt,"",f.any2i(pkt,val)) for val in lval] oval = "".join(lval) else: warning("Unknown field option %s" % name) continue s += chr(onum) s += chr(len(oval)) s += oval elif (type(o) is str and DHCPRevOptions.has_key(o) and DHCPRevOptions[o][1] == None): s += chr(DHCPRevOptions[o][0]) elif type(o) is int: s += chr(o)+"\0" elif type(o) is str: s += o else: warning("Malformed option %s" % o) return s class DHCP(Packet): name = "DHCP options" fields_desc = [ DHCPOptionsField("options","") ] bind_layers( UDP, BOOTP, dport=67, sport=68) bind_layers( UDP, BOOTP, dport=68, sport=67) bind_bottom_up( UDP, BOOTP, dport=67, sport=67) bind_layers( BOOTP, DHCP, options='c\x82Sc') def dhcp_request(iface=None,**kargs): if conf.checkIPaddr != 0: warning("conf.checkIPaddr is not 0, I may not be able to match the answer") if iface is None: iface = conf.iface fam,hw = get_if_raw_hwaddr(iface) return srp1(Ether(dst="ff:ff:ff:ff:ff:ff")/IP(src="0.0.0.0",dst="255.255.255.255")/UDP(sport=68,dport=67) /BOOTP(chaddr=hw)/DHCP(options=[("message-type","discover"),"end"]),iface=iface,**kargs) class BOOTP_am(AnsweringMachine): function_name = "bootpd" filter = "udp and port 68 and port 67" send_function = staticmethod(sendp) def parse_options(self, pool=Net("192.168.1.128/25"), network="192.168.1.0/24",gw="192.168.1.1", domain="localnet", renewal_time=60, lease_time=1800): if type(pool) is str: poom = Net(pool) self.domain = domain netw,msk = (network.split("/")+["32"])[:2] msk = itom(int(msk)) self.netmask = ltoa(msk) self.network = ltoa(atol(netw)&msk) self.broadcast = ltoa( atol(self.network) | (0xffffffff&~msk) ) self.gw = gw if isinstance(pool,Gen): pool = [k for k in pool if k not in [gw, self.network, self.broadcast]] pool.reverse() if len(pool) == 1: pool, = pool self.pool = pool self.lease_time = lease_time self.renewal_time = renewal_time self.leases = {} def is_request(self, req): if not req.haslayer(BOOTP): return 0 reqb = req.getlayer(BOOTP) if reqb.op != 1: return 0 return 1 def print_reply(self, req, reply): print "Reply %s to %s" % (reply.getlayer(IP).dst,reply.dst) def make_reply(self, req): mac = req.src if type(self.pool) is list: if not self.leases.has_key(mac): self.leases[mac] = self.pool.pop() ip = self.leases[mac] else: ip = self.pool repb = req.getlayer(BOOTP).copy() repb.op="BOOTREPLY" repb.yiaddr = ip repb.siaddr = self.gw repb.ciaddr = self.gw repb.giaddr = self.gw del(repb.payload) rep=Ether(dst=mac)/IP(dst=ip)/UDP(sport=req.dport,dport=req.sport)/repb return rep class DHCP_am(BOOTP_am): function_name="dhcpd" def make_reply(self, req): resp = BOOTP_am.make_reply(self, req) if DHCP in req: dhcp_options = [(op[0],{1:2,3:5}.get(op[1],op[1])) for op in req[DHCP].options if type(op) is tuple and op[0] == "message-type"] dhcp_options += [("server_id",self.gw), ("domain", self.domain), ("router", self.gw), ("name_server", self.gw), ("broadcast_address", self.broadcast), ("subnet_mask", self.netmask), ("renewal_time", self.renewal_time), ("lease_time", self.lease_time), "end" ] resp /= DHCP(options=dhcp_options) return resp