|
Bugzilla – Full Text Bug Listing |
| Summary: | Naming inconsitency: TcpHeader::GetDestinationPort vs UdpHeader::GetDestination | ||
|---|---|---|---|
| Product: | ns-3 | Reporter: | Gustavo J. A. M. Carneiro <gjcarneiro> |
| Component: | internet | Assignee: | ns-bugs <ns-bugs> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | P1 | ||
| Version: | pre-release | ||
| Hardware: | All | ||
| OS: | All | ||
| Attachments: | Refactor the udp-header naming for consistency with tcp-header | ||
|
Description
Gustavo J. A. M. Carneiro
2008-05-30 06:17:22 UTC
Yes, do you have a preference for which way to go? That is, do we rename the TcpHeader APIs to match the UdpHeader ones, or vice versa? My personal preference would be GetDestinationPort instead of just GetDestination. Agree. To me GetDestination makes me think of a destination address. It's a TCP header, though and so you must be referring to something in there, rather than an address. If you pull out your handy Stevens, you see on the inside cover that it must be referring to the source port number and destination port number (in his words). Same story for UDP. GetDestinationPort and GetSourcePort for TCP and UDP seem perfect. Created attachment 155 [details]
Refactor the udp-header naming for consistency with tcp-header
This bug is about GetDestination, but for consistency, we should change the names of SetDestination, GetSource, and SetSource as well. This patch does so. Okay to push?
(In reply to comment #4) > Created an attachment (id=155) [edit] > Refactor the udp-header naming for consistency with tcp-header > > This bug is about GetDestination, but for consistency, we should change the > names of SetDestination, GetSource, and SetSource as well. This patch does so. > Okay to push? looks good to me. OK changeset: 3b24ac252fba |