Class Ipv4Header.Builder

  • Enclosing class:
    Ipv4Header

    public static final class Ipv4Header.Builder
    extends java.lang.Object
    Builder class for Ipv4Header.
    • Constructor Detail

      • Builder

        public Builder()
        Constructor with parameters for the required properties of Ipv4Header.
    • Method Detail

      • setDstIp

        public Ipv4Header.Builder setDstIp​(java.lang.String dstIp)
        The destination ip address. format: ipv4
        Parameters:
        dstIp - New value for the property.
      • setFlags

        public Ipv4Header.Builder setFlags​(java.lang.Long flags)
        IP flags format: int64
        Parameters:
        flags - New value for the property.
      • setProtocol

        public Ipv4Header.Builder setProtocol​(java.lang.Long protocol)
        IP protocol - defaults to ICMP format: int64
        Parameters:
        protocol - New value for the property.
      • setSrcIp

        public Ipv4Header.Builder setSrcIp​(java.lang.String srcIp)
        The source ip address. format: ipv4
        Parameters:
        srcIp - New value for the property.
      • setSrcSubnetPrefixLen

        public Ipv4Header.Builder setSrcSubnetPrefixLen​(java.lang.Long srcSubnetPrefixLen)
        This is used together with src_ip to calculate dst_ip for broadcast when dst_ip is not given; not used in all other cases. format: int64
        Parameters:
        srcSubnetPrefixLen - New value for the property.
      • setTtl

        public Ipv4Header.Builder setTtl​(java.lang.Long ttl)
        Time to live (ttl) format: int64
        Parameters:
        ttl - New value for the property.