_id
stringlengths
2
7
text
stringlengths
6
2.61k
title
stringclasses
1 value
c6700
// Count mocks base method // nolint
c6701
// Count indicates an expected call of Count // nolint
c6702
// GetAllRecords mocks base method // nolint
c6703
// GetAllDataPathPacketRecords mocks base method // nolint
c6704
// CollectUserEvent indicates an expected call of CollectUserEvent // nolint
c6705
// NewPortSpec creates a new port spec
c6706
// NewPortSpecFromString creates a new port spec
c6707
// SinglePort returns the port of a non multi-port spec
c6708
// MultiPort returns the multi-port range as a string.
c6709
// Overlaps returns true if the provided port spect overlaps with the given one.
c6710
// IsIncluded returns trues if a port is within the range of the portspec
c6711
// Helpher functions for the package, mainly for debugging and validation // They are not used by the main package // VerifyIPChecksum returns true if the IP header checksum is correct // for this packet, false otherwise. Note that the checksum is not // modified.
c6712
// UpdateIPChecksum computes the IP header checksum and updates the // packet with the value.
c6713
// VerifyTCPChecksum returns true if the TCP header checksum is correct // for this packet, false otherwise. Note that the checksum is not // modified.
c6714
// UpdateTCPChecksum computes the TCP header checksum and updates the // packet with the value.
c6715
//PacketToStringTCP returns a string representation of fields contained in this packet.
c6716
// Computes the IP header checksum. The packet is not modified.
c6717
// Computes the TCP header checksum. The packet is not modified.
c6718
// incCsum16 implements rfc1624, equation 3.
c6719
// Computes a sum of 16 bit numbers
c6720
// Computes a checksum over the given slice.
c6721
// UpdateUDPChecksum updates the UDP checksum field of packet
c6722
// ReadUDPToken returnthe UDP token. Gets called only during the handshake process.
c6723
// UDPTokenAttach attached udp packet signature and tokens.
c6724
// UDPDataAttach Attaches UDP data post encryption.
c6725
// CreateReverseFlowPacket modifies the packet for reverse flow.
c6726
// GetUDPType returns udp type of packet.
c6727
// GetUDPTypeFromBuffer gets the UDP packet from a raw buffer.,
c6728
// CreateUDPAuthMarker creates a UDP auth marker.
c6729
// NewJWT creates a new JWT token processor
c6730
// CreateAndSign creates a new token, attaches an ephemeral key pair and signs with the issuer // key. It also randomizes the source nonce of the token. It returns back the token and the private key.
c6731
// Randomize adds a nonce to an existing token. Returns the nonce
c6732
// RetrieveNonce returns the nonce of a token. It copies the value
c6733
// addTransmitterLabel adds the enforcerconstants.TransmitterLabel as a fixed label in the policy. // The ManagementID part of the policy is used as the enforcerconstants.TransmitterLabel. // If the Policy didn't set the ManagementID, we use the Local contextID as the // default enforcerconstants.TransmitterLabel.
c6734
// SubOptionMonitorLinuxExtractor provides a way to specify metadata extractor for linux monitors.
c6735
// SubOptionMonitorCNIExtractor provides a way to specify metadata extractor for CNI monitors.
c6736
// SubOptionMonitorUIDExtractor provides a way to specify metadata extractor for UID monitors.
c6737
// SubOptionMonitorSSHExtractor provides a way to specify metadata extractor for SSH monitors.
c6738
// SubOptionMonitorDockerExtractor provides a way to specify metadata extractor for docker.
c6739
// SubOptionMonitorDockerSocket provides a way to specify socket info for docker.
c6740
// SubOptionMonitorDockerFlags provides a way to specify configuration flags info for docker.
c6741
// SubOptionMonitorKubernetesKubeconfig provides a way to specify a kubeconfig to use to connect to Kubernetes. // In case of an in-cluter config, leave the kubeconfig field blank
c6742
// SubOptionMonitorKubernetesNodename provides a way to specify the kubernetes node name. // This is useful for filtering
c6743
// SubOptionMonitorKubernetesHostPod provides a way to specify if we want to activate Pods launched in host mode.
c6744
// SubOptionMonitorKubernetesExtractor provides a way to specify metadata extractor for Kubernetes
c6745
// SubOptionMonitorKubernetesDockerExtractor provides a way to specify metadata extractor for docker.
c6746
// SubOptionMonitorPodKubeconfig provides a way to specify a kubeconfig to use to connect to Kubernetes. // In case of an in-cluter config, leave the kubeconfig field blank
c6747
// SubOptionMonitorPodNodename provides a way to specify the kubernetes node name. // This is useful for filtering
c6748
// SubOptionMonitorPodActivateHostPods provides a way to specify if we want to activate Pods launched in host mode.
c6749
// SubOptionMonitorPodMetadataExtractor provides a way to specify metadata extractor for Kubernetes
c6750
// SubOptionMonitorPodNetclsProgrammer provides a way to program the net_cls cgroup for host network pods in Kubernetes
c6751
// OptionCollector provide a way to add to the docker monitor the collector instance
c6752
// OptionPolicyResolver provides a way to add to the docker monitor the policy resolver instance
c6753
// NewMonitor provides a configuration for monitors.
c6754
//AddEthernetLayer creates an Ethernet layer
c6755
//AddIPLayer creates an IP layer
c6756
//AddTCPLayer creates a TCP layer
c6757
//SetTCPSynAck changes the TCP SYN and ACK flag to true
c6758
//NewTCPPayload adds new payload to TCP layer
c6759
//DecodePacket returns decoded packet which implements PacketManipulator
c6760
//NewPacketFlow returns PacketFlow struct which implements PacketFlowManipulator
c6761
//AppendPacket adds the packet to Flow field of PacketFlowManipulator interface
c6762
//GetMatchPackets implicitly returns the matching packets requested by the user
c6763
//GetUptoFirstSynAckPacket will return packets upto first SynAck packet
c6764
//GetNthPacket returns the packet requested by the user from the array
c6765
// ConvertServicesToPortList converts an array of services to a port list
c6766
// NewDebugClient initializes a new Debug Client
c6767
// CreateSocket returns a handle to SocketWriter interface
c6768
// NewPUInfo instantiates a new ContainerPolicy
c6769
// PUInfoFromPolicyAndRuntime generates a ContainerInfo Struct from an existing RuntimeInfo and PolicyInfo
c6770
// ErrPUNotFound creates a new context not found error
c6771
// ErrPUNotUnique creates a new not unique error
c6772
// ErrPUCreateFailed creates a new PU create failed error
c6773
// ErrPUAlreadyActivated creates a new PU already activated error
c6774
// ErrPUPolicyPending creates a new PU policy pending error.
c6775
// ErrPUPolicyEnforcementFailed creates a new PU policy pending error.
c6776
// IsErrPUNotFound checks if this error is a PU not found error
c6777
// IsErrPUNotUnique checks if this error is a PU not unique error
c6778
// IsErrPUCreateFailed checks if this error is a PU not unique error
c6779
// IsErrPUAlreadyActivated checks if this error is a PU already activated error
c6780
// IsErrPUPolicyPending checks if this error is a PU policy pending error.
c6781
// IsErrPUEnforcementFailed checks if this error is a PU policy pending error.
c6782
// ExecuteCommandFromArguments processes the command from the arguments
c6783
// NewCustomRequestProcessor creates a new request processor
c6784
// CreateAndRun creates a processing unit
c6785
// DeleteService will issue a delete command
c6786
// DeleteCgroup will issue a delete command based on the cgroup // This is used mainly by the cleaner.
c6787
// ExecuteRequest executes the command with an RPC request
c6788
// sendRequest sends an RPC request to the provided address
c6789
// ParseServices parses strings with the services and returns them in an // validated slice
c6790
// ComputeHmac256 computes the HMAC256 of the message
c6791
// VerifyHmac verifies if the HMAC of the message matches the one provided
c6792
// GenerateRandomBytes returns securely generated random bytes. // It will return an error if the system's secure random // number generator fails to function correctly, in which // case the caller should not continue.
c6793
// GenerateRandomString returns a URL-safe, base64 encoded // securely generated random string. // It will return an error if the system's secure random // number generator fails to function correctly, in which // case the caller should not continue.
c6794
// LoadRootCertificates loads the certificates in the provide PEM buffer in a CertPool
c6795
// LoadEllipticCurveKey parses and creates an EC key
c6796
// LoadAndVerifyCertificate parses, validates, and creates a certificate structure from a PEM buffer // It must be provided with the a CertPool
c6797
// LoadAndVerifyECSecrets loads all the certificates and keys to memory in the right data structures
c6798
// LoadCertificate loads a certificate from a PEM file without verifying // Should only be used for loading a root CA certificate. It will only read // the first certificate
c6799
// NewRPCClient mocks base method // nolint