Lines Matching refs:expect_params

192 def check_ipv4(expect_params, packet):  argument
193 src_address = expect_params.get('src_address')
194 dst_address = expect_params.get('dst_address')
195 flags = expect_params.get('flags')
196 tos = expect_params.get('tc')
197 ttl = expect_params.get('hlim')
221 def check_ipv6(expect_params, packet): argument
222 src_address = expect_params.get('src_address')
223 dst_address = expect_params.get('dst_address')
224 flags = expect_params.get('flags')
225 hlim = expect_params.get('hlim')
226 tc = expect_params.get('tc')
251 def check_ping_4(expect_params, packet): argument
252 expect_length = expect_params['length']
253 if not check_ipv4(expect_params, packet):
269 def check_ping_request_4(expect_params, packet): argument
270 if not check_ping_4(expect_params, packet):
279 def check_ping_reply_4(expect_params, packet): argument
280 if not check_ping_4(expect_params, packet):
289 def check_ping_request_6(expect_params, packet): argument
290 expect_length = expect_params['length']
291 if not check_ipv6(expect_params, packet):
303 def check_ping_reply_6(expect_params, packet): argument
304 expect_length = expect_params['length']
305 if not check_ipv6(expect_params, packet):
345 def check_tcp(expect_params, packet): argument
346 tcp_flags = expect_params.get('tcp_flags')
347 mss = expect_params.get('mss')
348 seq = expect_params.get('seq')
380 def check_udp(expect_params, packet): argument
381 expect_length = expect_params['length']
404 def check_tcp_syn_request_4(expect_params, packet): argument
405 if not check_ipv4(expect_params, packet):
407 if not check_tcp(expect_params | {'tcp_flags': 'S'}, packet):
412 def check_tcp_syn_reply_4(send_params, expect_params, packet): argument
413 if not check_ipv4(expect_params, packet):
415 if not check_tcp(expect_params | {'tcp_flags': 'SA'}, packet):
450 def check_udp_request_4(expect_params, packet): argument
451 if not check_ipv4(expect_params, packet):
453 if not check_udp(expect_params, packet):
458 def check_tcp_syn_request_6(expect_params, packet): argument
459 if not check_ipv6(expect_params, packet):
461 if not check_tcp(expect_params | {'tcp_flags': 'S'}, packet):
466 def check_tcp_syn_reply_6(expect_params, packet): argument
467 if not check_ipv6(expect_params, packet):
469 if not check_tcp(expect_params | {'tcp_flags': 'SA'}, packet):
504 def check_udp_request_6(expect_params, packet): argument
505 if not check_ipv6(expect_params, packet):
507 if not check_udp(expect_params, packet):
512 expect_params = args['expect_params']
513 src_address = expect_params.get('src_address')
514 dst_address = expect_params.get('dst_address')
521 return check_tcp_syn_request_6(expect_params, packet)
523 return check_tcp_syn_request_4(expect_params, packet)
527 expect_params = args['expect_params']
528 src_address = expect_params.get('src_address')
529 dst_address = expect_params.get('dst_address')
536 return check_tcp_syn_reply_6(expect_params, packet)
538 return check_tcp_syn_reply_4(expect_params, packet)
541 expect_params = args['expect_params']
542 src_address = expect_params.get('src_address')
543 dst_address = expect_params.get('dst_address')
556 expect_params = args['expect_params']
557 src_address = expect_params.get('src_address')
558 dst_address = expect_params.get('dst_address')
565 return check_udp_request_6(expect_params, packet)
567 return check_udp_request_4(expect_params, packet)
571 recvif, ping_type, sniff_type, expect_params, defrag, send_params, argument
589 {'send_params': send_params, 'expect_params': expect_params},
674 expect_params = {}
682 expect_params[param_name] = param_arg if param_arg else None
684 expect_params['length'] = send_params['length']
714 sniffer_params = copy(expect_params)
725 sniffer_params = copy(expect_params)