Home
last modified time | relevance | path

Searched refs:scapy (Results 1 – 18 of 18) sorted by relevance

/kernel/tests/net/test/
Dpackets.py19 from scapy import all as scapy unknown
47 return {4: scapy.IP, 5: scapy.IP, 6: scapy.IPv6}[version]
50 if isinstance(packet, scapy.IPv6):
52 elif isinstance(packet, scapy.IP):
64 scapy.UDP(sport=sport, dport=53) / UDP_PAYLOAD)
68 packet = (scapy.IP(src=srcaddr, dst=dstaddr, ttl=lifetime, tos=0x83) /
69 scapy.UDP(sport=sport, dport=53) /
72 packet = (scapy.IPv6(src=srcaddr, dst=dstaddr,
74 scapy.UDP(sport=sport, dport=53) /
86 scapy.TCP(sport=sport, dport=dport,
[all …]
Dxfrm_base.py18 from scapy import all as scapy unknown
172 udp_layer = packet.getlayer(scapy.UDP)
176 esp_packet = scapy.Raw(xfrm.EspHdr((spi, seq)).Pack())
181 ip_type = {4: scapy.IP, 6: scapy.IPv6}[outer_version]
184 esp_nexthdr = {scapy.IPv6: IPPROTO_IPV6,
185 scapy.IP: IPPROTO_IPIP}[type(packet)]
203 esp_packet.payload = scapy.Raw(inner_layer)
205 packet.payload = scapy.Raw(str(esp_packet) + trailer)
209 if type(packet) is scapy.IPv6:
213 packet = scapy.IPv6(str(packet))
[all …]
Dtun_twister.py26 from scapy import all as scapy unknown
156 if ip_type not in (scapy.IP, scapy.IPv6):
167 return scapy.IP(packet_bytes)
169 return scapy.IPv6(packet_bytes)
205 return scapy.Ether(bytes_in)
Dtcp_fastopen_test.py21 from scapy import all as scapy unknown
67 ip_layer = {4: scapy.IP, 6: scapy.IPv6}[version]
116 t = syn.getlayer(scapy.TCP)
118 t.payload = scapy.Raw(net_test.UDP_PAYLOAD)
Dneighbour_test.py23 from scapy import all as scapy unknown
130 scapy.IPv6(src=src, dst=dst) /
131 scapy.ICMPv6ND_NS(tgt=addr) /
132 scapy.ICMPv6NDOptSrcLLAddr(lladdr=llsrc)
154 scapy.Ether(src=mac, dst=self.MyMacAddress(self.netid)) /
155 scapy.IPv6(src=srcaddr, dst=dstaddr) /
156 scapy.ICMPv6ND_NA(tgt=addr, S=S, O=O, R=R) /
157 scapy.ICMPv6NDOptDstLLAddr(lladdr=mac)
Dping6_test.py30 from scapy import all as scapy unknown
90 layers = ["IP", "ICMP", scapy.ICMPv6EchoRequest]
107 src = packet.getlayer(scapy.IP).src
109 scapy.IP(src=self.INTERMEDIATE_IPV4, dst=src) /
110 scapy.ICMP(type=11, code=0) /
113 src = packet.getlayer(scapy.IPv6).src
115 scapy.IPv6(src=self.INTERMEDIATE_IPV6, dst=src) /
116 scapy.ICMPv6TimeExceeded(code=0) /
120 src = packet.getlayer(scapy.IPv6).src
123 scapy.IPv6(src=self.INTERMEDIATE_IPV6, dst=src) /
[all …]
Dnet_test.py25 from scapy import all as scapy unknown
82 UDP_PAYLOAD = str(scapy.DNS(rd=1,
84 qd=scapy.DNSQR(qname="wWW.GoOGle.CoM",
212 ifr = fcntl.ioctl(s, scapy.SIOCGIFINDEX, ifr)
222 ifr = struct.pack("%dsH6s" % IFNAMSIZ, ifname, scapy.ARPHDR_ETHER, hwaddr)
229 ifr = fcntl.ioctl(s, scapy.SIOCGIFFLAGS, ifr)
232 flags |= scapy.IFF_UP
234 flags &= ~scapy.IFF_UP
236 ifr = fcntl.ioctl(s, scapy.SIOCSIFFLAGS, ifr)
Dxfrm_test.py19 from scapy import all as scapy unknown
57 udp_hdr = packet[scapy.UDP]
303 incoming = (scapy.IP(src=remoteaddr, dst=myaddr) /
304 scapy.UDP(sport=4500, dport=encap_port) / payload)
305 incoming = scapy.IP(str(incoming))
327 scapy.IP(src=remoteaddr, dst=myaddr) / scapy.UDP(
507 IpType = {4: scapy.IP, 6: scapy.IPv6}[version]
509 scapy.UDP(sport=remote_port, dport=local_port) /
526 self.assertEquals(output_pkt[scapy.UDP].len, len("output_hello") + 8)
528 self.assertEquals(remote_port, output_pkt[scapy.UDP].dport)
[all …]
DAndroid.bp8 "scapy",
Dsrcaddr_selection_test.py23 from scapy import all as scapy unknown
285 dad_defense = (scapy.Ether(src=conflict_macaddr, dst="33:33:33:00:00:01") /
286 scapy.IPv6(src=self.test_ip, dst="ff02::1") /
287 scapy.ICMPv6ND_NA(tgt=self.test_ip, R=0, S=0, O=1) /
288 scapy.ICMPv6NDOptDstLLAddr(lladdr=conflict_macaddr))
Dmultinetwork_base.py29 from scapy import all as scapy unknown
246 ra = (scapy.Ether(src=macaddr, dst="33:33:00:00:00:01") /
247 scapy.IPv6(src=lladdr, hlim=255) /
248 scapy.ICMPv6ND_RA(reachabletime=reachabletime,
251 scapy.ICMPv6NDOptSrcLLAddr(lladdr=macaddr) /
252 scapy.ICMPv6NDOptPrefixInfo(prefix=cls.OnlinkPrefix(6, netid),
537 packet = scapy.Ether(src=routermac, dst=mymac) / ip_packet
556 ether = scapy.Ether(packet)
Dxfrm_algorithm_test.py21 from scapy import all as scapy unknown
121 packet.getlayer(scapy.UDP),
124 packet.getlayer(scapy.TCP),
Dxfrm_tunnel_test.py26 from scapy import all as scapy unknown
73 _SCAPY_IP_TYPE = {4: scapy.IP, 6: scapy.IPv6}
97 IpType = {4: scapy.IP, 6: scapy.IPv6}[inner_version]
99 IpType(**ip_hdr_options) / scapy.UDP(sport=src_port, dport=dst_port) /
690 'id': scapy.IP(str(pkt.payload)[8:]).id,
691 'flags': scapy.IP(str(pkt.payload)[8:]).flags
694 ip_hdr_options = {'fl': scapy.IPv6(str(pkt.payload)[8:]).fl}
Dmultinetwork_test.py26 from scapy import all as scapy unknown
279 expected = (scapy.IPv6(src=srcaddr, dst=net_test.IPV6_ADDR,
281 scapy.IPv6ExtHdrDestOpt(
282 options=[scapy.PadN(optdata="\x00\x00\x00\x00\x00\x00"),
283 scapy.HBHOptUnknown(otype=0x8b,
285 scapy.UDP(sport=sport, dport=53) /
602 options = scapy.ICMPv6NDOptRouteInfo(rtlifetime=rtlifetime, plen=plen,
831 reply = scapy.Ether(src=tgtmac, dst=mymac) / reply
Dtcp_repair_test.py29 from scapy import all as scapy unknown
/kernel/tests/net/test/rootfs/
Dwheezy.list26 python-scapy
Dstretch.list24 python-scapy
Dstretch.sh59 apt-get install -y -t buster python-scapy