Package com.vmware.nsx_policy.model
Class FieldsPacketData
- java.lang.Object
-
- com.vmware.nsx_policy.model.FieldsPacketData
-
- All Implemented Interfaces:
com.vmware.vapi.bindings.StaticStructure,com.vmware.vapi.bindings.Structure,java.io.Serializable
public final class FieldsPacketData extends java.lang.Object implements java.io.Serializable, com.vmware.vapi.bindings.StaticStructure- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFieldsPacketData.BuilderBuilder class forFieldsPacketData.
-
Field Summary
Fields Modifier and Type Field Description protected com.vmware.vapi.data.StructValue__dynamicStructureFieldsstatic java.lang.String_TYPE_IDENTIFIERIdentifier denoting this class, when it is used in polymorphic context.
-
Constructor Summary
Constructors Modifier Constructor Description FieldsPacketData()Default constructor.protectedFieldsPacketData(com.vmware.vapi.data.StructValue __dynamicStructureFields)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends com.vmware.vapi.bindings.Structure>
T_convertTo(java.lang.Class<T> clazz)java.lang.String_getCanonicalName()static java.lang.String_getCanonicalTypeName()Returns the canonical type name.static com.vmware.vapi.bindings.type.StructType_getClassType()WARNING: Internal method, subject to change in future versions.com.vmware.vapi.data.StructValue_getDataValue()com.vmware.vapi.data.DataValue_getDynamicField(java.lang.String fieldName)java.util.Set<java.lang.String>_getDynamicFieldNames()com.vmware.vapi.bindings.type.StructType_getType()boolean_hasTypeNameOf(java.lang.Class<? extends com.vmware.vapi.bindings.Structure> clazz)static FieldsPacketData_newInstance(com.vmware.vapi.data.StructValue structValue)WARNING: Internal method, subject to change in future versions.
Returns new instance of this binding class and injects the provided data value.
WARNING: The returned object is not fully initialized.static FieldsPacketData_newInstance2(com.vmware.vapi.data.StructValue structValue)WARNING: Internal method, subject to change in future versions.
Serves as a versioning mechanism.void_setDynamicField(java.lang.String fieldName, com.vmware.vapi.data.DataValue fieldValue)protected void_updateDataValue(com.vmware.vapi.data.StructValue structValue)void_validate()booleanequals(java.lang.Object obj)ArpHeadergetArpHeader()EthernetHeadergetEthHeader()java.lang.LonggetFrameSize()If the requested frame_size is too small (given the payload and traceflow metadata requirement of 16 bytes), the traceflow request will fail with an appropriate message.Ipv4HeadergetIpHeader()Ipv6HeadergetIpv6Header()java.lang.StringgetPayload()Up to 1000 bytes of payload may be supplied (with a base64-encoded length of 1336 bytes.) Additional bytes of traceflow metadata will be appended to the payload.java.lang.StringgetResourceType()Possible values are:PacketData.RESOURCE_TYPE_BINARYPACKETDATAPacketData.RESOURCE_TYPE_FIELDSPACKETDATAPacket configuration The value of this property is automatically populated to"FieldsPacketData".java.lang.BooleangetRouted()When this flag is set, traceflow packet will have its destination overwritten as the gateway address of the logical router to which the source logical switch is connected.TransportProtocolHeadergetTransportHeader()java.lang.StringgetTransportType()Possible values are:PacketData.TRANSPORT_TYPE_BROADCASTPacketData.TRANSPORT_TYPE_UNICASTPacketData.TRANSPORT_TYPE_MULTICASTPacketData.TRANSPORT_TYPE_UNKNOWNThis type takes effect only for IP packet.inthashCode()voidsetArpHeader(ArpHeader arpHeader)voidsetEthHeader(EthernetHeader ethHeader)voidsetFrameSize(java.lang.Long frameSize)If the requested frame_size is too small (given the payload and traceflow metadata requirement of 16 bytes), the traceflow request will fail with an appropriate message.voidsetIpHeader(Ipv4Header ipHeader)voidsetIpv6Header(Ipv6Header ipv6Header)voidsetPayload(java.lang.String payload)Up to 1000 bytes of payload may be supplied (with a base64-encoded length of 1336 bytes.) Additional bytes of traceflow metadata will be appended to the payload.voidsetRouted(java.lang.Boolean routed)When this flag is set, traceflow packet will have its destination overwritten as the gateway address of the logical router to which the source logical switch is connected.voidsetTransportHeader(TransportProtocolHeader transportHeader)voidsetTransportType(java.lang.String transportType)Possible values are:PacketData.TRANSPORT_TYPE_BROADCASTPacketData.TRANSPORT_TYPE_UNICASTPacketData.TRANSPORT_TYPE_MULTICASTPacketData.TRANSPORT_TYPE_UNKNOWNThis type takes effect only for IP packet.java.lang.StringtoString()
-
-
-
Field Detail
-
_TYPE_IDENTIFIER
public static final java.lang.String _TYPE_IDENTIFIER
Identifier denoting this class, when it is used in polymorphic context.This value should be assigned to the property which is used to discriminate the actual type used in the polymorphic context.
- See Also:
- Constant Field Values
-
__dynamicStructureFields
protected com.vmware.vapi.data.StructValue __dynamicStructureFields
-
-
Method Detail
-
getArpHeader
public ArpHeader getArpHeader()
- Returns:
- The current value of the property.
-
setArpHeader
public void setArpHeader(ArpHeader arpHeader)
- Parameters:
arpHeader- New value for the property.
-
getEthHeader
public EthernetHeader getEthHeader()
- Returns:
- The current value of the property.
-
setEthHeader
public void setEthHeader(EthernetHeader ethHeader)
- Parameters:
ethHeader- New value for the property.
-
getIpHeader
public Ipv4Header getIpHeader()
- Returns:
- The current value of the property.
-
setIpHeader
public void setIpHeader(Ipv4Header ipHeader)
- Parameters:
ipHeader- New value for the property.
-
getIpv6Header
public Ipv6Header getIpv6Header()
- Returns:
- The current value of the property.
-
setIpv6Header
public void setIpv6Header(Ipv6Header ipv6Header)
- Parameters:
ipv6Header- New value for the property.
-
getPayload
public java.lang.String getPayload()
Up to 1000 bytes of payload may be supplied (with a base64-encoded length of 1336 bytes.) Additional bytes of traceflow metadata will be appended to the payload. The payload contains any data the user wants to put after the transport header.- Returns:
- The current value of the property.
-
setPayload
public void setPayload(java.lang.String payload)
Up to 1000 bytes of payload may be supplied (with a base64-encoded length of 1336 bytes.) Additional bytes of traceflow metadata will be appended to the payload. The payload contains any data the user wants to put after the transport header.- Parameters:
payload- New value for the property.
-
getTransportHeader
public TransportProtocolHeader getTransportHeader()
- Returns:
- The current value of the property.
-
setTransportHeader
public void setTransportHeader(TransportProtocolHeader transportHeader)
- Parameters:
transportHeader- New value for the property.
-
getFrameSize
public java.lang.Long getFrameSize()
If the requested frame_size is too small (given the payload and traceflow metadata requirement of 16 bytes), the traceflow request will fail with an appropriate message. The frame will be zero padded to the requested size. format: int64- Returns:
- The current value of the property.
-
setFrameSize
public void setFrameSize(java.lang.Long frameSize)
If the requested frame_size is too small (given the payload and traceflow metadata requirement of 16 bytes), the traceflow request will fail with an appropriate message. The frame will be zero padded to the requested size. format: int64- Parameters:
frameSize- New value for the property.
-
getResourceType
public java.lang.String getResourceType()
Possible values are: Packet configuration The value of this property is automatically populated to"FieldsPacketData".- Returns:
- The current value of the property.
-
getRouted
public java.lang.Boolean getRouted()
When this flag is set, traceflow packet will have its destination overwritten as the gateway address of the logical router to which the source logical switch is connected. More specifically: - For ARP request, the target IP will be overwritten as gateway IP if the target IP is not in the same subnet of gateway. - For ARP response, the target IP and destination MAC will be overwritten as gateway IP/MAC respectively, if the target IP is not in the same subnet of gateway. - For IP packet, the destination MAC will be overwritten as gateway MAC. However, this flag will not be effective when injecting the traceflow packet to a VLAN backed port. This is because the gateway in this case is a physical gateway that is outside the scope of NSX. Therefore, users need to manually populate the gateway MAC address. If the user still sets this flag in this case, a validation error will be thrown. The scenario where a user injects a packet with a VLAN tag into a parent port is referred to as the traceflow container case. Please note that the value of `routed` depends on the connected network of the child segment rather than the connected network of segment of the parent port in this case. Here is the explanation: The parent port in this context is the port on a segment which is referred to by a SegmentConnectionBindingMap. The bound segment of the SegmentConnectionBindingMap is the child segment. The user-crafted traceflow packet will be directly forwarded to the corresponding child segment of the parent port without interacting with any layer 2 forwarding/layer 3 routing in this scenario. The crafted packet will follow the forwarding/routing polices of the child segment's connected network. For example, if a user injects a crafted packet to port_p, and the segment (seg_p) of port_p is referred to by the binding map m1, where m1 is bound to segment seg_c, and the destination port (port_d) of the packet is the VM vNIC connected to seg_p. Although port_p and port_d are on the same segment, the 'routed' value should be set to true if the user expects the crafted packet to be correctly delivered to the destination. This is because the child segments seg_c and seg_d are on different segments and require router interaction to communicate.- Returns:
- The current value of the property.
-
setRouted
public void setRouted(java.lang.Boolean routed)
When this flag is set, traceflow packet will have its destination overwritten as the gateway address of the logical router to which the source logical switch is connected. More specifically: - For ARP request, the target IP will be overwritten as gateway IP if the target IP is not in the same subnet of gateway. - For ARP response, the target IP and destination MAC will be overwritten as gateway IP/MAC respectively, if the target IP is not in the same subnet of gateway. - For IP packet, the destination MAC will be overwritten as gateway MAC. However, this flag will not be effective when injecting the traceflow packet to a VLAN backed port. This is because the gateway in this case is a physical gateway that is outside the scope of NSX. Therefore, users need to manually populate the gateway MAC address. If the user still sets this flag in this case, a validation error will be thrown. The scenario where a user injects a packet with a VLAN tag into a parent port is referred to as the traceflow container case. Please note that the value of `routed` depends on the connected network of the child segment rather than the connected network of segment of the parent port in this case. Here is the explanation: The parent port in this context is the port on a segment which is referred to by a SegmentConnectionBindingMap. The bound segment of the SegmentConnectionBindingMap is the child segment. The user-crafted traceflow packet will be directly forwarded to the corresponding child segment of the parent port without interacting with any layer 2 forwarding/layer 3 routing in this scenario. The crafted packet will follow the forwarding/routing polices of the child segment's connected network. For example, if a user injects a crafted packet to port_p, and the segment (seg_p) of port_p is referred to by the binding map m1, where m1 is bound to segment seg_c, and the destination port (port_d) of the packet is the VM vNIC connected to seg_p. Although port_p and port_d are on the same segment, the 'routed' value should be set to true if the user expects the crafted packet to be correctly delivered to the destination. This is because the child segments seg_c and seg_d are on different segments and require router interaction to communicate.- Parameters:
routed- New value for the property.
-
getTransportType
public java.lang.String getTransportType()
Possible values are: This type takes effect only for IP packet.- Returns:
- The current value of the property.
-
setTransportType
public void setTransportType(java.lang.String transportType)
Possible values are: This type takes effect only for IP packet.- Parameters:
transportType- New value for the property.
-
_getType
public com.vmware.vapi.bindings.type.StructType _getType()
- Specified by:
_getTypein interfacecom.vmware.vapi.bindings.StaticStructure
-
_getDataValue
public com.vmware.vapi.data.StructValue _getDataValue()
- Specified by:
_getDataValuein interfacecom.vmware.vapi.bindings.Structure
-
_updateDataValue
protected void _updateDataValue(com.vmware.vapi.data.StructValue structValue)
-
_validate
public void _validate()
- Specified by:
_validatein interfacecom.vmware.vapi.bindings.StaticStructure
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Specified by:
toStringin interfacecom.vmware.vapi.bindings.StaticStructure- Overrides:
toStringin classjava.lang.Object
-
_hasTypeNameOf
public boolean _hasTypeNameOf(java.lang.Class<? extends com.vmware.vapi.bindings.Structure> clazz)
- Specified by:
_hasTypeNameOfin interfacecom.vmware.vapi.bindings.Structure
-
_convertTo
public <T extends com.vmware.vapi.bindings.Structure> T _convertTo(java.lang.Class<T> clazz)
- Specified by:
_convertToin interfacecom.vmware.vapi.bindings.Structure
-
_setDynamicField
public void _setDynamicField(java.lang.String fieldName, com.vmware.vapi.data.DataValue fieldValue)- Specified by:
_setDynamicFieldin interfacecom.vmware.vapi.bindings.StaticStructure
-
_getDynamicField
public com.vmware.vapi.data.DataValue _getDynamicField(java.lang.String fieldName)
- Specified by:
_getDynamicFieldin interfacecom.vmware.vapi.bindings.StaticStructure
-
_getDynamicFieldNames
public java.util.Set<java.lang.String> _getDynamicFieldNames()
- Specified by:
_getDynamicFieldNamesin interfacecom.vmware.vapi.bindings.StaticStructure
-
_getClassType
public static com.vmware.vapi.bindings.type.StructType _getClassType()
WARNING: Internal method, subject to change in future versions.- Returns:
StructTypeinstance representing the static bindings type for thisStructure.
-
_getCanonicalName
public java.lang.String _getCanonicalName()
- Specified by:
_getCanonicalNamein interfacecom.vmware.vapi.bindings.Structure
-
_getCanonicalTypeName
public static java.lang.String _getCanonicalTypeName()
Returns the canonical type name. See_getCanonicalName().- Returns:
- canonical type name
-
_newInstance
public static FieldsPacketData _newInstance(com.vmware.vapi.data.StructValue structValue)
WARNING: Internal method, subject to change in future versions.
Returns new instance of this binding class and injects the provided data value.
WARNING: The returned object is not fully initialized.- Parameters:
structValue- the source of the data contained in the binding object. Could contain more data than fields of this class can describe i.e. newer version of the binding object. Could be null.- Returns:
- the static bindings
StructType
-
_newInstance2
public static FieldsPacketData _newInstance2(com.vmware.vapi.data.StructValue structValue)
WARNING: Internal method, subject to change in future versions.
Serves as a versioning mechanism.
-
-