:py:mod:`vspyx.TCPIP` ===================== .. py:module:: vspyx.TCPIP Package Contents ---------------- Classes ~~~~~~~ .. autoapisummary:: vspyx.TCPIP.AddressFamily vspyx.TCPIP.CurlRequest vspyx.TCPIP.CurlRequestAuthentication vspyx.TCPIP.Follower vspyx.TCPIP.IPDatagramPoint vspyx.TCPIP.IPDiscoveryProcessor vspyx.TCPIP.IPProtocol vspyx.TCPIP.IPv4Follower vspyx.TCPIP.IPv4TCPHostSocket vspyx.TCPIP.IPv6Follower vspyx.TCPIP.IPv6TCPHostSocket vspyx.TCPIP.Interface vspyx.TCPIP.Module vspyx.TCPIP.Network vspyx.TCPIP.Protocol vspyx.TCPIP.Socket vspyx.TCPIP.SocketInputOutputStream vspyx.TCPIP.SocketStateChangePoint vspyx.TCPIP.SocketType vspyx.TCPIP.TCPACKPoint vspyx.TCPIP.TCPFollower vspyx.TCPIP.TCPHostSocket vspyx.TCPIP.TCPUDPEndpoint vspyx.TCPIP.TLSHostSocket vspyx.TCPIP.UDPFollower .. py:class:: AddressFamily Bases: :py:obj:`enum.IntEnum` .. autoapi-inheritance-diagram:: vspyx.TCPIP.AddressFamily :parts: 1 :private-bases: Enum where members are also (and must be) ints .. py:attribute:: IPv4 :annotation: = 1 .. py:attribute:: IPv6 :annotation: = 2 .. py:attribute:: Unspecified :annotation: = 0 .. py:class:: CurlRequest CurlRequest .. py:class:: HttpVersion Bases: :py:obj:`enum.IntEnum` .. autoapi-inheritance-diagram:: vspyx.TCPIP.CurlRequest.HttpVersion :parts: 1 :private-bases: Enum where members are also (and must be) ints .. py:attribute:: HTTP_1_0 :annotation: = 1 .. py:attribute:: HTTP_1_1 :annotation: = 2 .. py:class:: RequestMethod Bases: :py:obj:`enum.IntEnum` .. autoapi-inheritance-diagram:: vspyx.TCPIP.CurlRequest.RequestMethod :parts: 1 :private-bases: Enum where members are also (and must be) ints .. py:attribute:: GET :annotation: = 0 .. py:attribute:: POST :annotation: = 1 .. py:attribute:: PUT :annotation: = 2 .. py:class:: TlsVersion Bases: :py:obj:`enum.IntEnum` .. autoapi-inheritance-diagram:: vspyx.TCPIP.CurlRequest.TlsVersion :parts: 1 :private-bases: Enum where members are also (and must be) ints .. py:attribute:: Insecure :annotation: = 0 .. py:attribute:: TLS_1_2 :annotation: = 6 .. py:class:: UploadStats UploadStats .. py:attribute:: totalTime :annotation: :int .. py:attribute:: uploadSpeed :annotation: :int .. py:attribute:: LastHttpVersionUsed :annotation: :CurlRequest.HttpVersion .. py:method:: Download(self, url: str) -> vspyx.Core.BytesView Download(self, url: str, responseCode: int) -> vspyx.Core.BytesView Download(self, url: str, responseCode: int, requestMethod: CurlRequest.RequestMethod) -> vspyx.Core.BytesView Download(self, url: str, responseCode: int, requestMethod: CurlRequest.RequestMethod, postField: str) -> vspyx.Core.BytesView Download(self, url: str, outputStream: vspyx.IO.OutputStream) -> int Download(self, url: str, outputStream: vspyx.IO.OutputStream, responseCode: int) -> int Download(self, url: str, outputStream: vspyx.IO.OutputStream, responseCode: int, requestMethod: CurlRequest.RequestMethod) -> int Download(self, url: str, outputStream: vspyx.IO.OutputStream, responseCode: int, requestMethod: CurlRequest.RequestMethod, postField: str) -> int .. py:method:: RequestVerified(self) -> bool .. py:method:: SetTimeout(self, timeout: Any) -> Any .. py:method:: ShowProgress(self, showProgress: bool) -> Any .. py:method:: Upload(self, url: str, srcBuffer: vspyx.Core.BytesView) -> CurlRequest.UploadStats Upload(self, url: str, srcBuffer: vspyx.Core.BytesView, responseCode: int) -> CurlRequest.UploadStats Upload(self, url: str, inputStream: vspyx.IO.InputStream) -> CurlRequest.UploadStats Upload(self, url: str, inputStream: vspyx.IO.InputStream, responseCode: int) -> CurlRequest.UploadStats .. py:class:: CurlRequestAuthentication CurlRequestAuthentication .. py:attribute:: CACertificate :annotation: :str .. py:attribute:: Certificate :annotation: :str .. py:attribute:: Key :annotation: :str .. py:method:: HasAllCredentials(self) -> bool .. py:method:: SetCACert(self, caCert: str) -> Any .. py:class:: Follower Bases: :py:obj:`vspyx.Runtime.Component` .. autoapi-inheritance-diagram:: vspyx.TCPIP.Follower :parts: 1 :private-bases: Represents TCP/IP packet handling object .. py:class:: ConnectionStateChange Bases: :py:obj:`enum.IntEnum` .. autoapi-inheritance-diagram:: vspyx.TCPIP.Follower.ConnectionStateChange :parts: 1 :private-bases: Enum where members are also (and must be) ints .. py:attribute:: Closed :annotation: = 2 .. py:attribute:: Error :annotation: = 0 .. py:attribute:: OpenedOrDetected :annotation: = 1 .. py:class:: FilterMode Bases: :py:obj:`enum.IntEnum` .. autoapi-inheritance-diagram:: vspyx.TCPIP.Follower.FilterMode :parts: 1 :private-bases: Enum where members are also (and must be) ints .. py:attribute:: AllButFilters :annotation: = 1 .. py:attribute:: OnlyFilters :annotation: = 0 .. py:attribute:: OnTCPConnectionStateChanged :annotation: :vspyx.Core.Callback_43999c9b56 .. py:attribute:: OnTCPData :annotation: :vspyx.Core.Callback_bf209425cf .. py:method:: AddFilter(self, ipVersion: vspyx.Core.IPVersion, ipProtocol: IPProtocol, address: str, port: int) -> Any AddFilter(self, ipVersion: vspyx.Core.IPVersion, ipProtocol: IPProtocol, address: str, port: int, otherAddress: Any) -> Any .. py:method:: Attach(self, channel: vspyx.Communication.EthernetChannel) -> Any .. py:method:: ClearFilters(self) -> Any .. py:method:: Detach(self) -> Any .. py:method:: GetFilterMode(self) -> Follower.FilterMode .. py:method:: New() -> Follower :staticmethod: .. py:method:: SetFilterMode(self, set: Follower.FilterMode) -> Any .. py:class:: IPDatagramPoint Bases: :py:obj:`vspyx.Communication.DatagramPoint` .. autoapi-inheritance-diagram:: vspyx.TCPIP.IPDatagramPoint :parts: 1 :private-bases: IPDatagramPoint .. py:attribute:: IsRoutingLayer :annotation: :bool .. py:attribute:: IsRoutingLayerTag :annotation: :str .. py:method:: GetAttribute(self, type: str) -> vspyx.Runtime.Value Get an attribute of this point by its tag If the attribute doesn't exist, an empty Runtime::Value will be returned. .. py:class:: IPDiscoveryProcessor Bases: :py:obj:`vspyx.Communication.PointProcessor` .. autoapi-inheritance-diagram:: vspyx.TCPIP.IPDiscoveryProcessor :parts: 1 :private-bases: IPDiscoveryProcessor .. py:attribute:: EphemeralPortRange :annotation: :Any Get the range [min, max] of ports which are considered ephemeral. Ephemeral ports will be coalesced into a single Traceable, as long as both ports are not in the ephemeral range. .. py:method:: New() -> IPDiscoveryProcessor :staticmethod: .. py:class:: IPProtocol Bases: :py:obj:`enum.IntEnum` .. autoapi-inheritance-diagram:: vspyx.TCPIP.IPProtocol :parts: 1 :private-bases: Represents a protocol type (TCP or UDP) .. py:attribute:: TCP :annotation: = 6 .. py:attribute:: UDP :annotation: = 17 .. py:class:: IPv4Follower Bases: :py:obj:`vspyx.Communication.PointProcessor` .. autoapi-inheritance-diagram:: vspyx.TCPIP.IPv4Follower :parts: 1 :private-bases: Represents raw IP data handling and processing .. py:attribute:: OnRawDatagram :annotation: :vspyx.Core.Callback_cc25a8fde8 .. py:attribute:: VerifyChecksums :annotation: :bool .. py:method:: New() -> IPv4Follower :staticmethod: .. py:method:: ProcessDatagram(self, data: vspyx.Core.BytesView) -> Any .. py:class:: IPv4TCPHostSocket Bases: :py:obj:`TCPHostSocket` .. autoapi-inheritance-diagram:: vspyx.TCPIP.IPv4TCPHostSocket :parts: 1 :private-bases: IPv4TCPHostSocket .. py:class:: IPv6Follower Bases: :py:obj:`vspyx.Communication.PointProcessor` .. autoapi-inheritance-diagram:: vspyx.TCPIP.IPv6Follower :parts: 1 :private-bases: A PointProcessor which creates IPDatagramPoints from IPv6 traffic. Does not yet reassemble fragmented datagrams. .. py:method:: New() -> IPv6Follower :staticmethod: .. py:class:: IPv6TCPHostSocket Bases: :py:obj:`TCPHostSocket` .. autoapi-inheritance-diagram:: vspyx.TCPIP.IPv6TCPHostSocket :parts: 1 :private-bases: IPv6TCPHostSocket .. py:class:: Interface Bases: :py:obj:`vspyx.Runtime.Component` .. autoapi-inheritance-diagram:: vspyx.TCPIP.Interface :parts: 1 :private-bases: Represents an Ethernet interface .. py:attribute:: AttachedChannel :annotation: :vspyx.Communication.EthernetChannel .. py:attribute:: IPv4Address :annotation: :vspyx.Core.IPv4Address .. py:attribute:: IPv4Gateway :annotation: :vspyx.Core.IPv4Address .. py:attribute:: IPv4Netmask :annotation: :vspyx.Core.IPv4Address .. py:attribute:: InterfaceID :annotation: :int .. py:attribute:: MACAddress :annotation: :str .. py:attribute:: Network :annotation: :Network .. py:attribute:: OnConfigurationMutation :annotation: :vspyx.Core.Callback_634bd5c449 .. py:attribute:: OnEgress :annotation: :vspyx.Core.Callback_92f40c8a1f .. py:attribute:: Up :annotation: :bool .. py:method:: AddARPEntry(self, ip: str, mac: str) -> Any .. py:method:: Attach(self, channel: vspyx.Communication.EthernetChannel) -> Any .. py:method:: AutoconfigureIPv6Address(self, prefix: vspyx.Core.IPv6Address) -> bool .. py:method:: BindToIPv6Address(self, set: vspyx.Core.IPv6Address) -> bool .. py:method:: ClearARPTable(self) -> Any .. py:method:: CloneConfiguration(self) -> Any Return the immutable configuration of this object. Except for the resolver parenting relationship, this represents the entire serializable state of the object. .. py:method:: Detach(self) -> Any .. py:method:: GetARPTableEntry(self, ip: str) -> str .. py:method:: Ingress(self, frame: vspyx.Frames.Frame) -> vspyx.Communication.Connector.IngressActions .. py:method:: New() -> Interface New(config: Any) -> Interface :staticmethod: .. py:method:: RemoveARPEntry(self, ip: str) -> bool .. py:method:: SendARPRequest(self, ip: str) -> Any .. py:class:: Module Bases: :py:obj:`vspyx.Core.Module` .. autoapi-inheritance-diagram:: vspyx.TCPIP.Module :parts: 1 :private-bases: Represents a TCP/IP module interface .. py:method:: AddNetwork(self, network: Network) -> Any .. py:class:: Network Bases: :py:obj:`vspyx.Communication.PointProcessor` .. autoapi-inheritance-diagram:: vspyx.TCPIP.Network :parts: 1 :private-bases: Represents a managed collection of network interfaces .. py:attribute:: OnConfigurationMutation :annotation: :vspyx.Core.Callback_634bd5c449 .. py:method:: AddInterface(self, iface: Interface) -> Any .. py:method:: CloneConfiguration(self) -> Any Return the immutable configuration of this object. Except for the resolver parenting relationship, this represents the entire serializable state of the object. .. py:method:: New() -> Network New(config: Any) -> Network :staticmethod: .. py:method:: NewIPv4TCPSocket(self) -> Socket .. py:method:: NewIPv4UDPSocket(self) -> Socket .. py:method:: NewIPv6TCPSocket(self) -> Socket .. py:method:: NewIPv6UDPSocket(self) -> Socket .. py:method:: NewRawIPv4Socket(self, protocol: Protocol) -> Socket .. py:method:: NewRawIPv6Socket(self, protocol: Protocol) -> Socket .. py:method:: NewSocket(self, af: AddressFamily, type: SocketType, protocol: Protocol) -> Socket .. py:class:: Protocol Bases: :py:obj:`enum.IntEnum` .. autoapi-inheritance-diagram:: vspyx.TCPIP.Protocol :parts: 1 :private-bases: Enum where members are also (and must be) ints .. py:attribute:: ICMPv4 :annotation: = 1 .. py:attribute:: ICMPv6 :annotation: = 58 .. py:attribute:: IGMP :annotation: = 2 .. py:attribute:: IPv4 :annotation: = 0 .. py:attribute:: IPv6 :annotation: = 41 .. py:attribute:: TCP :annotation: = 6 .. py:attribute:: UDP :annotation: = 17 .. py:class:: Socket Bases: :py:obj:`vspyx.Core.Object` .. autoapi-inheritance-diagram:: vspyx.TCPIP.Socket :parts: 1 :private-bases: Represents a standard TCP/UDP socket object .. py:class:: Accepted Accepted .. py:attribute:: AcceptedSocket :annotation: :Socket .. py:attribute:: Endpoint :annotation: :TCPUDPEndpoint .. py:class:: ReceivedFrom ReceivedFrom .. py:attribute:: Endpoint :annotation: :TCPUDPEndpoint .. py:attribute:: Received :annotation: :vspyx.Core.BytesView .. py:class:: State Bases: :py:obj:`enum.IntEnum` .. autoapi-inheritance-diagram:: vspyx.TCPIP.Socket.State :parts: 1 :private-bases: Enum where members are also (and must be) ints .. py:attribute:: CLOSED :annotation: = 0 .. py:attribute:: CLOSING :annotation: = 1 .. py:attribute:: CONNECTED :annotation: = 3 .. py:attribute:: CONNECTING :annotation: = 2 .. py:attribute:: LISTENING :annotation: = 4 .. py:attribute:: ActivityEvent :annotation: :vspyx.Core.Event .. py:attribute:: IPProtocol :annotation: :IPProtocol .. py:attribute:: IPVersion :annotation: :vspyx.Core.IPVersion .. py:attribute:: IsClosed :annotation: :bool .. py:attribute:: Linger :annotation: :bool .. py:attribute:: LingerTime :annotation: :Any .. py:attribute:: Name :annotation: :str .. py:attribute:: NoDelay :annotation: :bool .. py:attribute:: PeerName :annotation: :str .. py:method:: Accept(self) -> Any .. py:method:: Bind(self, address: str, port: Any) -> Any Bind(self, address: str, port: Any, iface: Interface) -> Any .. py:method:: Close(self) -> Any .. py:method:: Connect(self, address: str, port: int) -> Any Connect(self, address: str, port: int, iface: Interface) -> Any .. py:method:: GetState(self) -> Socket.State .. py:method:: Listen(self, maxIncomingConnections: int) -> Any .. py:method:: Receive(self, maxReceiveSize: int) -> Any .. py:method:: ReceiveFrom(self, maxReceiveSize: int) -> Any .. py:method:: Send(self, data: vspyx.Core.BytesView) -> int Send(self, data: vspyx.Core.BytesView, outOfBand: bool) -> int .. py:method:: SendTo(self, data: vspyx.Core.BytesView, address: str, port: Any) -> int SendTo(self, data: vspyx.Core.BytesView, address: str, port: Any, outOfBand: bool) -> int SendTo(self, data: vspyx.Core.BytesView, address: str, port: Any, outOfBand: bool, iface: Interface) -> int .. py:method:: Shutdown(self) -> Any Shutdown(self, readDisabled: bool) -> Any Shutdown(self, readDisabled: bool, writeDisabled: bool) -> Any .. py:class:: SocketInputOutputStream Bases: :py:obj:`vspyx.IO.InputOutputStream` .. autoapi-inheritance-diagram:: vspyx.TCPIP.SocketInputOutputStream :parts: 1 :private-bases: SocketInputOutputStream .. py:method:: Connect(self, hostname: str, port: int) -> Any .. py:class:: SocketStateChangePoint Bases: :py:obj:`vspyx.Runtime.Point` .. autoapi-inheritance-diagram:: vspyx.TCPIP.SocketStateChangePoint :parts: 1 :private-bases: SocketStateChangePoint .. py:attribute:: Interesting :annotation: :vspyx.Runtime.Point.Interesting .. py:method:: GetAttribute(self, type: str) -> vspyx.Runtime.Value Get an attribute of this point by its tag If the attribute doesn't exist, an empty Runtime::Value will be returned. .. py:class:: SocketType Bases: :py:obj:`enum.IntEnum` .. autoapi-inheritance-diagram:: vspyx.TCPIP.SocketType :parts: 1 :private-bases: Enum where members are also (and must be) ints .. py:attribute:: Datagram :annotation: = 2 .. py:attribute:: Raw :annotation: = 3 .. py:attribute:: Stream :annotation: = 1 .. py:attribute:: Unspecified :annotation: = 0 .. py:class:: TCPACKPoint Bases: :py:obj:`vspyx.Runtime.Point` .. autoapi-inheritance-diagram:: vspyx.TCPIP.TCPACKPoint :parts: 1 :private-bases: TCPACKPoint .. py:attribute:: Interesting :annotation: :vspyx.Runtime.Point.Interesting .. py:method:: GetAttribute(self, type: str) -> vspyx.Runtime.Value Get an attribute of this point by its tag If the attribute doesn't exist, an empty Runtime::Value will be returned. .. py:class:: TCPFollower Bases: :py:obj:`vspyx.Communication.PointProcessor` .. autoapi-inheritance-diagram:: vspyx.TCPIP.TCPFollower :parts: 1 :private-bases: Represents TCP packet reconstruction handling and connection state management .. py:attribute:: OnConnectionStateChanged :annotation: :vspyx.Core.Callback_43999c9b56 .. py:attribute:: OnConnectionStateChangedTracked :annotation: :vspyx.Core.Callback_612855dbcb .. py:attribute:: OnData :annotation: :vspyx.Core.Callback_bf209425cf .. py:attribute:: OnTrackedData :annotation: :vspyx.Core.Callback_14d0a27fbb .. py:method:: New() -> TCPFollower :staticmethod: .. py:method:: ProcessIPDatagram(self, ipVersion: vspyx.Core.IPVersion, data: vspyx.Core.BytesView) -> Any .. py:class:: TCPHostSocket Bases: :py:obj:`Socket` .. autoapi-inheritance-diagram:: vspyx.TCPIP.TCPHostSocket :parts: 1 :private-bases: TCPHostSocket .. py:attribute:: ActivityEvent :annotation: :vspyx.Core.Event .. py:attribute:: AvailableBytes :annotation: :int .. py:attribute:: IsClosed :annotation: :bool .. py:attribute:: Linger :annotation: :bool .. py:attribute:: LingerTime :annotation: :Any .. py:attribute:: NoDelay :annotation: :bool .. py:attribute:: State :annotation: :Socket.State .. py:method:: Close(self) -> Any .. py:method:: Listen(self, maxIncomingConnections: int) -> Any .. py:method:: Receive(self, maxReceiveSize: int) -> Any .. py:method:: Send(self, data: vspyx.Core.BytesView, outOfBand: bool) -> int .. py:method:: Shutdown(self, readDisabled: bool, writeDisabled: bool) -> Any .. py:class:: TCPUDPEndpoint Represents a TCP/UDP endpoint identifier .. py:attribute:: DestinationAddress :annotation: :vspyx.Core.IPAddress .. py:attribute:: DestinationPort :annotation: :int .. py:attribute:: Proto :annotation: :IPProtocol .. py:attribute:: SourceAddress :annotation: :vspyx.Core.IPAddress .. py:attribute:: SourcePort :annotation: :int .. py:attribute:: Version :annotation: :vspyx.Core.IPVersion .. py:method:: __eq__(self, rhs: TCPUDPEndpoint) -> bool Return self==value. .. py:method:: __str__(self) -> str Return str(self). .. py:class:: TLSHostSocket Bases: :py:obj:`Socket` .. autoapi-inheritance-diagram:: vspyx.TCPIP.TLSHostSocket :parts: 1 :private-bases: TLSHostSocket .. py:class:: UDPFollower Bases: :py:obj:`vspyx.Communication.PointProcessor` .. autoapi-inheritance-diagram:: vspyx.TCPIP.UDPFollower :parts: 1 :private-bases: Watches for routing layer (IPv4 or IPv6) IPDatagramPoints and creates UDP layer IPDatagramPoints, optionally checking the checksum. .. py:method:: New() -> UDPFollower :staticmethod: