[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 |
||
| 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 |