ipscap.util package

IpSurv’s Module Index

ipscap.util.evaluation_parser module

class EvaluationParser(rules=None)

Bases: object

OPERATOR_EQUAL = 1
OPERATOR_GREATER = 4
OPERATOR_LESS = 8
OPERATOR_NOT_EQUAL = 2
assigned(name)
evaluate(name, v)
get(name)
get_items()
get_rule(name)
get_value(name, index=0)
initialize(rules)
is_empty()
parse(rule_value)
exception EvaluationParserException

Bases: Exception

ipscap.util.raw_socket_entity module

class Header

Bases: abc.ABC

get_sanitized_data()
class ICMPHeader

Bases: ipscap.util.raw_socket_entity.Header, ipscap.util.raw_socket_entity.ProtocolHeader

DEFAULT_HEADER_LEN = 4
class IPHeader

Bases: ipscap.util.raw_socket_entity.Header

DIRECTION_RECEIVE = 2
DIRECTION_SEND = 1
PROTOCOL_ICMP = 1
PROTOCOL_TCP = 6
PROTOCOL_UDP = 17
classmethod get_direction_code(direction)
classmethod get_protocol(code)
classmethod get_protocol_code(protocol)
class ProtocolHeader

Bases: abc.ABC

class TCPHeader

Bases: ipscap.util.raw_socket_entity.Header, ipscap.util.raw_socket_entity.ProtocolHeader

DEFAULT_HEADER_LEN = 20
FLAG_ACK = 16
FLAG_CWR = 128
FLAG_ECE = 64
FLAG_FIN = 1
FLAG_PSH = 8
FLAG_RST = 4
FLAG_SYN = 2
FLAG_URG = 32
classmethod get_flag_codes(flags)
classmethod get_flags(codes)
class UDPHeader

Bases: ipscap.util.raw_socket_entity.Header, ipscap.util.raw_socket_entity.ProtocolHeader

DEFAULT_HEADER_LEN = 8

ipscap.util.raw_socket_parser module

class HeaderParser

Bases: abc.ABC

get_hex(header_data, begin, size=1)
parse(ip_header, data, raws=False)
class ICMPHeaderParser

Bases: ipscap.util.raw_socket_parser.HeaderParser

create_icmp_header()
parse(ip_header, mtu_data, raws=False)
parse_bytes(icmp_header)
class IPHeaderParser(eth_ips=None)

Bases: object

create_icmp_header_parser()
create_ip_header()
create_tcp_header_parser()
create_udp_header_parser()
detect_direction(ip_header)
get_header_parser(ip_header)
get_hex(header_data, begin, size=1)
get_ip_header(data)
initialize(eth_ips)
parse(mtu_data, raws=False)
parse_bytes(ip_header)
class TCPHeaderParser

Bases: ipscap.util.raw_socket_parser.HeaderParser

create_tcp_header()
parse(ip_header, mtu_data, raws=False)
parse_bytes(tcp_header)
parse_tcp_options(data)
class UDPHeaderParser

Bases: ipscap.util.raw_socket_parser.HeaderParser

create_udp_header()
parse(ip_header, mtu_data, raws=False)
parse_bytes(udp_header)