Skip to content

Rename IpEndpoint member functions named port() to network_order_port().#8421

Merged
ywkaras merged 1 commit intoapache:masterfrom
ywkaras:ink_inet_port_bo
Oct 15, 2021
Merged

Rename IpEndpoint member functions named port() to network_order_port().#8421
ywkaras merged 1 commit intoapache:masterfrom
ywkaras:ink_inet_port_bo

Conversation

@ywkaras
Copy link
Copy Markdown
Contributor

@ywkaras ywkaras commented Oct 14, 2021

No description provided.

@ywkaras ywkaras added this to the 10.0.0 milestone Oct 14, 2021
@ywkaras ywkaras self-assigned this Oct 14, 2021
Copy link
Copy Markdown
Contributor

@bneradt bneradt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks for doing this Walt.

Comment thread iocore/net/UnixNetAccept.cc Outdated
@bneradt bneradt linked an issue Oct 14, 2021 that may be closed by this pull request
@bneradt
Copy link
Copy Markdown
Contributor

bneradt commented Oct 14, 2021

Looks like the CentOS build shows a few other uses of port():
https://jenkins.trafficserver.org/job/Github_Builds/job/centos/100/console

  CXX      QUICTypes.o
QUICTypes.cc: In constructor 'QUICFiveTuple::QUICFiveTuple(IpEndpoint, IpEndpoint, int)':
QUICTypes.cc:573:26: error: 'union IpEndpoint' has no member named 'port'
  573 |   this->_hash_code = src.port() + dst.port() + protocol;
      |                          ^~~~
QUICTypes.cc:573:39: error: 'union IpEndpoint' has no member named 'port'
  573 |   this->_hash_code = src.port() + dst.port() + protocol;
      |                                       ^~~~
QUICTypes.cc: In member function 'void QUICFiveTuple::update(IpEndpoint, IpEndpoint, int)':
QUICTypes.cc:583:26: error: 'union IpEndpoint' has no member named 'port'
  583 |   this->_hash_code = src.port() + dst.port() + protocol;
      |                          ^~~~
QUICTypes.cc:583:39: error: 'union IpEndpoint' has no member named 'port'
  583 |   this->_hash_code = src.port() + dst.port() + protocol;
      |                                       ^~~~
make[3]: *** [Makefile:1883: QUICTypes.o] Error 1

@SolidWallOfCode
Copy link
Copy Markdown
Member

I'm not sure what the word "byte" is for in "network byte order". "Network order" necessarily means the order of the bytes.

@ywkaras
Copy link
Copy Markdown
Contributor Author

ywkaras commented Oct 14, 2021

OK eveybody, the next time @SolidWallOfCode says "network order", we hold him down and attach a parabolic antenna to his head. That'll learn him not to leave the "byte" out. https://www.aftership.com/brands/dish.com

@ywkaras
Copy link
Copy Markdown
Contributor Author

ywkaras commented Oct 14, 2021

@bneradt I made the changes you requested.

Copy link
Copy Markdown
Contributor

@bneradt bneradt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@ywkaras ywkaras merged commit b93900b into apache:master Oct 15, 2021
zwoop pushed a commit that referenced this pull request Nov 8, 2021
@zwoop
Copy link
Copy Markdown
Contributor

zwoop commented Nov 8, 2021

Cherry-picked to v9.2.x

@zwoop zwoop modified the milestones: 10.0.0, 9.2.0 Nov 8, 2021
@zwoop
Copy link
Copy Markdown
Contributor

zwoop commented Nov 8, 2021

This has merge conflicts on 9.1.x, if we want this for the 9.1.x patch releases, we'd need a separate back port PR.

@ywkaras
Copy link
Copy Markdown
Contributor Author

ywkaras commented Nov 8, 2021 via email

ywkaras pushed a commit to ywkaras/trafficserver that referenced this pull request Jul 7, 2022
…(). (apache#8421) (apache#597)

(cherry picked from commit b93900b)

Conflicts:
iocore/net/SSLCertLookup.cc
proxy/http/HttpTransact.cc
proxy/http/PreWarmManager.cc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rename IpEndpoint::port to network_order_port

4 participants