@@ -80,12 +80,11 @@ func NewSetPacketInFormet(format uint32) *VendorHeader {
8080}
8181
8282type ControllerID struct {
83- pad [6 ]byte
84- ID uint16
83+ ID uint16
8584}
8685
8786func (c * ControllerID ) Len () uint16 {
88- return uint16 ( len ( c . pad ) + 2 )
87+ return 8
8988}
9089
9190func (c * ControllerID ) MarshalBinary () (data []byte , err error ) {
@@ -117,11 +116,10 @@ type TLVTableMap struct {
117116 OptType uint8
118117 OptLength uint8
119118 Index uint16
120- pad [2 ]byte
121119}
122120
123121func (t * TLVTableMap ) Len () uint16 {
124- return uint16 ( len ( t . pad ) + 6 )
122+ return 8
125123}
126124
127125func (t * TLVTableMap ) MarshalBinary () (data []byte , err error ) {
@@ -154,7 +152,6 @@ func (t *TLVTableMap) UnmarshalBinary(data []byte) error {
154152
155153type TLVTableMod struct {
156154 Command uint16
157- pad [6 ]byte
158155 TlvMaps []* TLVTableMap
159156}
160157
@@ -292,7 +289,6 @@ const (
292289type ContinuationPropBridge struct {
293290 * PropHeader /* Type: NXCPT_BRIDGE */
294291 Bridge [4 ]uint32
295- pad [4 ]uint8
296292}
297293
298294func (p * ContinuationPropBridge ) Len () (n uint16 ) {
@@ -341,7 +337,6 @@ func (p *ContinuationPropBridge) UnmarshalBinary(data []byte) error {
341337type ContinuationPropStack struct {
342338 * PropHeader /* Type: NXCPT_STACK */
343339 Stack []uint8
344- pad []uint8
345340}
346341
347342func (p * ContinuationPropStack ) Len () (n uint16 ) {
@@ -430,7 +425,6 @@ func (p *ContinuationPropMirrors) UnmarshalBinary(data []byte) error {
430425
431426type ContinuationPropConntracked struct {
432427 * PropHeader /* Type: NXCPT_CONNTRACKED */
433- pad [4 ]uint8
434428}
435429
436430func (p * ContinuationPropConntracked ) Len () (n uint16 ) {
@@ -469,7 +463,6 @@ func (p *ContinuationPropConntracked) UnmarshalBinary(data []byte) error {
469463type ContinuationPropTableID struct {
470464 * PropHeader /* Type: NXCPT_TABLE_ID */
471465 TableID uint8
472- pad [3 ]uint8
473466}
474467
475468func (p * ContinuationPropTableID ) Len () (n uint16 ) {
@@ -511,7 +504,6 @@ func (p *ContinuationPropTableID) UnmarshalBinary(data []byte) error {
511504
512505type ContinuationPropCookie struct {
513506 * PropHeader /* Type: NXCPT_COOKIE */
514- pad [4 ]uint8
515507 Cookie uint64
516508}
517509
@@ -554,7 +546,6 @@ func (p *ContinuationPropCookie) UnmarshalBinary(data []byte) error {
554546
555547type ContinuationPropActions struct {
556548 * PropHeader /* Type: NXCPT_ACTIONS */
557- pad [4 ]uint8
558549 Actions []Action
559550}
560551
@@ -617,7 +608,6 @@ func (p *ContinuationPropActions) UnmarshalBinary(data []byte) error {
617608
618609type ContinuationPropActionSet struct {
619610 * PropHeader /* Type: NXCPT_ACTION_SET */
620- pad [4 ]uint8
621611 ActionSet []Action
622612}
623613
@@ -772,7 +762,6 @@ const (
772762type PacketIn2PropPacket struct {
773763 * PropHeader
774764 Packet protocol.Ethernet
775- pad []uint8
776765}
777766
778767func (p * PacketIn2PropPacket ) Len () (n uint16 ) {
@@ -908,7 +897,6 @@ func (p *PacketIn2PropBufferID) UnmarshalBinary(data []byte) error {
908897type PacketIn2PropTableID struct {
909898 * PropHeader /* Type: NXPINT_TABLE_ID */
910899 TableID uint8
911- pad [3 ]uint8
912900}
913901
914902func (p * PacketIn2PropTableID ) Len () (n uint16 ) {
@@ -950,7 +938,6 @@ func (p *PacketIn2PropTableID) UnmarshalBinary(data []byte) error {
950938
951939type PacketIn2PropCookie struct {
952940 * PropHeader /* Type: NXPINT_COOKIE */
953- pad [4 ]uint8
954941 Cookie uint64
955942}
956943
@@ -996,7 +983,6 @@ func (p *PacketIn2PropCookie) UnmarshalBinary(data []byte) error {
996983type PacketIn2PropReason struct {
997984 * PropHeader /* Type: NXPINT_COOKIE */
998985 Reason uint8
999- pad [3 ]uint8
1000986}
1001987
1002988func (p * PacketIn2PropReason ) Len () (n uint16 ) {
@@ -1039,7 +1025,6 @@ func (p *PacketIn2PropReason) UnmarshalBinary(data []byte) error {
10391025type PacketIn2PropMetadata struct {
10401026 * PropHeader /* Type: NXPINT_METADATA */
10411027 Fields []MatchField
1042- pad []uint8
10431028}
10441029
10451030func (p * PacketIn2PropMetadata ) Len () (n uint16 ) {
@@ -1104,7 +1089,6 @@ func (p *PacketIn2PropMetadata) UnmarshalBinary(data []byte) error {
11041089type PacketIn2PropUserdata struct {
11051090 * PropHeader /* Type: NXPINT_USERDATA */
11061091 Userdata []uint8
1107- pad []uint8
11081092}
11091093
11101094func (p * PacketIn2PropUserdata ) Len () (n uint16 ) {
@@ -1149,7 +1133,6 @@ func (p *PacketIn2PropUserdata) UnmarshalBinary(data []byte) error {
11491133type PacketIn2PropContinuation struct {
11501134 * PropHeader /* Type: NXPINT_CONTINUATION */
11511135 Continuation []byte
1152- pad []uint8
11531136}
11541137
11551138func (p * PacketIn2PropContinuation ) Len () (n uint16 ) {
0 commit comments