object functions
A collection of Spark SQL functions for use with network data.
- Alphabetic
- By Inheritance
- functions
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def icmpcode_description(icmpCode: Any, icmpType: Any): Column
Given an 8-bit numeric ICMP code and the 8-bit numeric ICMP type it belongs to, returns the description given for this code by IANA, if it exists.
- def icmptype_description(icmpType: Any): Column
Given an 8-bit numeric ICMP type, returns the description given for this type by IANA, if it exists.
- def icmptype_is_deprecated(icmpType: Any): Column
Given an 8-bit numeric ICMP type, returns true if IANA considers this ICMP type to be deprecated.
- def icmptype_is_reserved(icmpType: Any): Column
Given an 8-bit numeric ICMP type, returns true if IANA considers this ICMP type to be reserved.
- def icmptype_is_unassigned(icmpType: Any): Column
Given an 8-bit numeric ICMP type, returns true if IANA considers this ICMP type to be unassigned.
- def icmptypecode(icmpType: Any, icmpCode: Any): Column
Given an 8-bit numeric ICMP type and ICMP code, returns a 16-bit numeric ICMP type + code.
Given an 8-bit numeric ICMP type and ICMP code, returns a 16-bit numeric ICMP type + code.
- Annotations
- @silent(" shiftLeft .*deprecated")
- def icmptypecode_code(icmpTypeCode: Any): Column
Given a 16-bit numeric ICMP type + code, returns the associated 8-bit numeric ICMP code.
- def icmptypecode_description(icmpTypeCode: Any): Column
Given a 16-bit numeric ICMP type + code, returns a text description of the ICMP type and code, containing the descriptions of the type and code given by IANA.
- def icmptypecode_type(icmpTypeCode: Any): Column
Given a 16-bit numeric ICMP type + code, returns the associated 8-bit numeric ICMP type.
Given a 16-bit numeric ICMP type + code, returns the associated 8-bit numeric ICMP type.
- Annotations
- @silent(" shiftRightUnsigned .*deprecated")
- def ipaddr(addr: Any): Column
Given an IP address in string form, returns the canonical form of that IP address.
- def ipaddr_eq(addr1: Any, addr2: Any): Column
Given two IP addresses in string form, returns true if they represent the same address.
- def ipaddr_gt(addr1: Any, addr2: Any): Column
Given two IP addresses in string form, returns true if the first address is greater than the second.
- def ipaddr_gteq(addr1: Any, addr2: Any): Column
Given two IP addresses in string form, returns true if the first address is greater than or equal to the second.
- def ipaddr_in(addr: Any, block: Any): Column
Given an IP address and an IP block in string form, returns true if the address is contained in the block.
- def ipaddr_in_collection(addr: Any, collection: Iterable[Any]): Column
Given an IP address and a collection of IP addresses and blocks in string form, returns true if the address is contained in the collection or any block in the collection.
- def ipaddr_is_ipv6(addr: Any): Column
Given an IP address in string form, returns true if it is an IPv6 address.
- def ipaddr_lt(addr1: Any, addr2: Any): Column
Given two IP addresses in string form, returns true if the first address is less than the second.
- def ipaddr_lteq(addr1: Any, addr2: Any): Column
Given two IP addresses in string form, returns true if the first address is less than or equal to the second.
- def ipaddr_ne(addr1: Any, addr2: Any): Column
Given two IP addresses in string form, returns true if they do not represent the same address.
- def ipaddr_normalize(addr: Any): Column
Given an IP address in string form, returns the canonical form of that IP address.
- def ipaddr_sort_key(addr: Any): Column
Given an IP address in string form, returns a byte array suitable to sort by.
- def ipaddr_to_bytes(addr: Any): Column
Given an IP addresses in string form, returns the byte array represntation of the address.
- def ipblock(block: Any): Column
Given an IP block in string form, returns the canonical form of that IP block.
- def ipblock_contains(block: Any, addr: Any): Column
Given an IP block and an IP address in string form, returns true if the block contains the address.
- def ipblock_eq(block1: Any, block2: Any): Column
Given two IP blocks in string form, returns true if they represent the same block.
- def ipblock_gt(block1: Any, block2: Any): Column
Given two IP blocks in string form, returns true if the first block as a pair of IP addresses is greater than the second.
- def ipblock_gteq(block1: Any, block2: Any): Column
Given two IP blocks in string form, returns true if the first block as a pair of IP addresses is greater than or equal to the second.
- def ipblock_lt(block1: Any, block2: Any): Column
Given two IP blocks in string form, returns true if the first block as a pair of IP addresses is less than the second.
- def ipblock_lteq(block1: Any, block2: Any): Column
Given two IP blocks in string form, returns true if the first block as a pair of IP addresses is less than or equal to the second.
- def ipblock_max(block: Any): Column
Given an IP block in string form, returns the maximum IP address contained within the block.
- def ipblock_min(block: Any): Column
Given an IP block in string form, returns the minimum IP address contained within the block.
- def ipblock_ne(block1: Any, block2: Any): Column
Given two IP blocks in string form, returns true if they do not represent the same block.
- def ipblock_normalize(block: Any): Column
Given an IP block in string form, returns the canonical form of that IP block.
- def ipblock_prefix_length(block: Any): Column
Given an IP block in string form, returns the length of the common prefix contained in the block.
- def ipblock_sort_key(block: Any): Column
Given an IP block in string form, returns a byte array suitable to sort by.
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def port_service_name(port: Any): Column
Given the numeric representation of a TCP, UDP, SCTP, or similar port, returns the service name given to that port by IANA, if any.
- def proto_keyword(proto: Any): Column
Given the numeric representation of an IP protocol, returns the keyword given to this protocol by IANA, if any.
- def silkattrs_and(attrs1: Any, attrs2: Any): Column
Given the numeric representations of two sets of SiLK attributes, returns the bitwise and of the attributes.
- def silkattrs_continuation(attrs: Any): Column
Given the numeric representation of a set of SiLK attributes, returns true if the "continuation" attribute is set.
- def silkattrs_expanded_flags(attrs: Any): Column
Given the numeric representation of a set of SiLK attributes, returns true if the "expanded flags" attribute is set.
- def silkattrs_fin_followed(attrs: Any): Column
Given the numeric representation of a set of SiLK attributes, returns true if the "FIN followed" attribute is set.
- def silkattrs_is_ipv6(attrs: Any): Column
Given the numeric representation of a set of SiLK attributes, returns true if the "is IPv6" attribute is set.
- def silkattrs_match(attrs: Any, high: Any, mask: Any): Column
Given the numeric representations of a set of SiLK attributes, a set of attributes that should be set high, and a mask of the attributes to be considered, returns true if the masked set is the same as the masked high bits.
- def silkattrs_match_str(attrs: Any, target: Any): Column
Given the numeric representation of a set of SiLK attributes, and a symbolic string representation of a set of bits to be checked, returns true if the attributes match the specification.
Given the numeric representation of a set of SiLK attributes, and a symbolic string representation of a set of bits to be checked, returns true if the attributes match the specification. The specification may be like "TCF" to indicate that the specified attributes should be set and the other attributes don't matter, or "TC/TCF" to indicate that the first set of specified attributes should be set and any others in the mask should not be set.
- def silkattrs_not(attrs: Any): Column
Given the numeric representation of a set of SiLK attributes, returns the bitwise inverse of the attributes.
- def silkattrs_of_string(attrs: Any): Column
Given a symbolic string representation of a set of SiLK attributes, returns the numeric attribute value.
- def silkattrs_or(attrs1: Any, attrs2: Any): Column
Given the numeric representations of two sets of SiLK attributes, returns the bitwise or of the attributes.
- def silkattrs_to_string(attrs: Any): Column
Given the numeric representation of a set of SiLK attributes, returns a symbolic string representation.
- def silkattrs_truncated(attrs: Any): Column
Given the numeric representation of a set of SiLK attributes, returns true if the "truncated" attribute is set.
- def silkattrs_uniform_packet_size(attrs: Any): Column
Given the numeric representation of a set of SiLK attributes, returns true if the "uniform packet size" attribute is set.
- def silkattrs_xor(attrs1: Any, attrs2: Any): Column
Given the numeric representations of two sets of SiLK attributes, returns the bitwise exclusive or of the attributes.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def tcpflags_ack(flags: Any): Column
Given the numeric representation of a set of TCP flags, returns true if the ACK (acknowledgement) flag is set.
- def tcpflags_and(flags1: Any, flags2: Any): Column
Given the numeric representations of two sets of TCP flags, returns the bitwise and of the flags.
- def tcpflags_cwr(flags: Any): Column
Given the numeric representation of a set of TCP flags, returns true if the CWR (congestion window reduced) flag is set.
- def tcpflags_ece(flags: Any): Column
Given the numeric representation of a set of TCP flags, returns true if the ECE (ECN-echo) flag is set.
- def tcpflags_fin(flags: Any): Column
Given the numeric representation of a set of TCP flags, returns true if the FIN (finished) flag is set.
- def tcpflags_match(flags: Any, high: Any, mask: Any): Column
Given the numeric representations of a set of TCP flags, a set of flags that should be set high, and a mask of the flags to be considered, returns true if the masked set is the same as the masked high bits.
- def tcpflags_match_str(flags: Any, target: Any): Column
Given the numeric representation of a set of TCP flags, and a symbolic string representation of a set of bits to be checked, returns true if the flags match the specification.
Given the numeric representation of a set of TCP flags, and a symbolic string representation of a set of bits to be checked, returns true if the flags match the specification. The specification may be like "UASF" to indicate that the specified flags should be set and the other flags don't matter, or "UA/UASF" to indicate that the first set of specified flags should be set and any others in the mask should not be set.
- def tcpflags_not(flags: Any): Column
Given the numeric representation of a set of TCP flags, returns the bitwise inverse of the flags.
- def tcpflags_of_string(flags: Any): Column
Given a symbolic string representation of a set of TCP flags, returns the numeric flag value.
- def tcpflags_or(flags1: Any, flags2: Any): Column
Given the numeric representations of two sets of TCP flags, returns the bitwise or of the flags.
- def tcpflags_psh(flags: Any): Column
Given the numeric representation of a set of TCP flags, returns true if the PSH (push) flag is set.
- def tcpflags_rst(flags: Any): Column
Given the numeric representation of a set of TCP flags, returns true if the RST (reset) flag is set.
- def tcpflags_syn(flags: Any): Column
Given the numeric representation of a set of TCP flags, returns true if the SYN (synchronisation) flag is set.
- def tcpflags_to_string(flags: Any): Column
Given the numeric representation of a set of TCP flags, returns a symbolic string representation.
- def tcpflags_urg(flags: Any): Column
Given the numeric representation of a set of TCP flags, returns true if the URG (urgent) flag is set.
- def tcpflags_xor(flags1: Any, flags2: Any): Column
Given the numeric representations of two sets of TCP flags, returns the bitwise exclusive or of the flags.
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
This is documentation for Mothra, a collection of Scala and Spark library functions for working with Internet-related data. Some modules contain APIs of general use to Scala programmers. Some modules make those tools more useful on Spark data-processing systems.
Please see the documentation for the individual packages for more details on their use.
Scala Packages
These packages are useful in Scala code without involving Spark:
org.cert.netsa.data
This package, which is collected as the
netsa-data
library, provides types for working with various kinds of information:org.cert.netsa.data.net
- types for working with network dataorg.cert.netsa.data.time
- types for working with time dataorg.cert.netsa.data.unsigned
- types for working with unsigned integral valuesorg.cert.netsa.io.ipfix
The
netsa-io-ipfix
library provides tools for reading and writing IETF IPFIX data from various connections and files.org.cert.netsa.io.silk
To read and write CERT NetSA SiLK file formats and configuration files, use the
netsa-io-silk
library.org.cert.netsa.util
The "junk drawer" of
netsa-util
so far provides only two features: First, a method for equipping Scala scala.collection.Iterators with exception handling. And second, a way to query the versions of NetSA libraries present in a JVM at runtime.Spark Packages
These packages require the use of Apache Spark:
org.cert.netsa.mothra.datasources
Spark datasources for CERT file types. This package contains utility features which add methods to Apache Spark DataFrameReader objects, allowing IPFIX and SiLK flows to be opened using simple
spark.read...
calls.The
mothra-datasources
library contains both IPFIX and SiLK functionality, whilemothra-datasources-ipfix
andmothra-datasources-silk
contain only what's needed for the named datasource.org.cert.netsa.mothra.analysis
A grab-bag of analysis helper functions and example analyses.
org.cert.netsa.mothra.functions
This single Scala object provides Spark SQL functions for working with network data. It is the entirety of the
mothra-functions
library.