- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: Specifying server tcp socket address in a clie...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2006 07:32 AM
07-06-2006 07:32 AM
How can I do the same when all I have is the host name (DNS has the port number)?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2006 08:14 AM
07-06-2006 08:14 AM
Re: Specifying server tcp socket address in a client program
What (precisely) do you mean by "(DNS has the port number)"?
In the simplest interpretation of your question, the answer is: Resolve the port number using a DNS query (probably using the C-socket library), then insert the information into the appropriate control block for the socket calls.
More information would be appreciated, however.
- Bob Gezelter, http://www.rlgsc.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2006 09:06 AM
07-06-2006 09:06 AM
Re: Specifying server tcp socket address in a client program
_Service_ names can be translated into port
numbers (by getservbyname(), for example).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2006 12:34 PM
07-06-2006 12:34 PM
Re: Specifying server tcp socket address in a client program
The second (production env) contains just host and you can see the comments they sent with respect to DNS. I crossed out our internal domain name so it dosn't become public.
"You will not have to include the port number, the DNS uses the default HTTP port, 80. Then DNS routes the request to the linux servers on the correct port.
So, before:
http://lnx429.xxxx.com:42472/opiws/.........
In Production:
http://opiws.serv.xxxx.com/opiws/......."
When I use the production host name and a port of 80, of course everything works. If I use the production host name and no port, I get an IOSB status of 308 which is -
%SYSTEM-F-IVADDR, invalid media address.
Thanks
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2006 01:59 PM
07-06-2006 01:59 PM
Re: Specifying server tcp socket address in a client program
From the snippet that you posted, it would appear that the correct port is 80 (the convention for the assignment for an HTTP server).
This is not a function of DNS. The test case that you included contains a port number as part of the URL. The DNS name of the server is extracted from the URL before (emphasis BEFORE) the name is supplied to the DNS clerk for translation to an IP address.
- Bob Gezelter, http://www.rlgsc.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2006 04:44 PM
07-06-2006 04:44 PM
Re: Specifying server tcp socket address in a client program
> number, the DNS uses the default HTTP
> port, 80. Then DNS routes the request to
> the linux servers on the correct port.
This guy's drooling. DNS has nothing to do
with the port number, only the translation
from the name to the IP address. Also, DNS
does not "route" anything.
Web browsers (and related programs) use port
80 by default for the "http" scheme. For
the names of other popular schemes, see, for
example:
http://en.wikipedia.org/wiki/URL
You _always_ need to specify a port number.
The only question is whether to use the port
number specified explicitly by someone else
(like 42472), or to use the port number of
your own choice (like 80). It helps if you
choose the port number where the desired
server application is listening.
On a UNIX system, the service name to port
number translation table is often found in
/etc/services (or a similar NIS data base).
On VMS, it depends on whose TCP/IP package.
("TCPIP SHOW SERVICE", for HP's TCPIP.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2006 06:48 PM
07-06-2006 06:48 PM
Re: Specifying server tcp socket address in a client program
And especially for HTTP in VMS, it depends from the TCPIP stack and the HTTP server software, if there is a service defined.
For HP TCPIP services (UCX) and the OSU HTTP server for example there is nothing defined , the port is established dynamically at OSU startup.
So You have to communicate with the remote systems manager to stay in synch.
What You could do to keep the application unchanged (by using getservbyname("HTTP",&port) ), is to establish a dummy HTTP service just to define the service port. So in case the HTTP port would change, only the TCPIP service setup would have to be changed, not the application program using it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2006 02:57 AM
07-07-2006 02:57 AM
SolutionIt was written
> So, before:
> http://lnx429.xxxx.com:42472/opiws/.........
>
> In Production:
> http://opiws.serv.xxxx.com/opiws/......."
By convention
http://opiws.serv.xxxx.com/opiws/
is equivalent to
http://opiws.serv.xxxx.com:80/opiws/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2006 02:41 PM
07-08-2006 02:41 PM
Re: Specifying server tcp socket address in a client program
Jeff