[OPNFLWJAVA-10] Type of OF Portnumber should be Short not Long Created: 19/Dec/13  Updated: 03/May/18  Resolved: 19/Dec/13

Status: Resolved
Project: openflowjava
Component/s: General
Affects Version/s: unspecified
Fix Version/s: None

Type: Improvement
Reporter: Ed Warnicke Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Mac OS
Platform: PC



 Description   

Type of OF PortNumber should be Short not Long



 Comments   
Comment by Michal Polkorab [ 19/Dec/13 ]

Hello,

PortNumber must be represented as Long, let me explain:

Both OF 1.0 and OF 1.3 models are using the same PortNumber structure.

In OF 1.0 the port is represented as uint16 - which must be stored as integer in java (because of the range of UNSIGNED short)

Similarly, in OF 1.3 the port is represented as uint32 - which must be stored as long.

Also there are special values used in the OF 1.3 (please see OF 1.3.2 spec - page 43) - these would be represented as negative value if the PortNumber was only integer. Moreover if the PortNumber was short - the values would not fit into it.

Best regards

Michal

Generated at Wed Feb 07 20:28:43 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.