I configured the following in my /etc/services/
file:
tt16 9898/tcp
and then called the getservbyname()
and got port number as 9898
(after ntohs()
).
I then changed the port number for the name as:
tt16 9900/tcp
But still the function getservbyname()
returned the port 9898
instead of 9900
.
Am I missing something here?