Re: How can a server know its own IP address

From: Jonathan Bartlett (johnnyb_at_eskimo.com)
Date: 09/28/05


Date: Wed, 28 Sep 2005 08:13:00 -0500

au.faisal wrote:
> Hi guys
>
> I am a newbie in socket programming. Can anyone tell me how can a
> server know on which IP address it is running.

It's configuration file. If it isn't specified, that usually means it
is running on all available IP addresses.

> To make it suppose a webserver is running on computer which has the IP
> address 131.100.0.1. How can the webserver get this IP server without
> hardcoding.
>
> is there any function for that?

Either the socket listens for all addresses (IIRC it's 0.0.0.0 to
specify) or it is specified in a config file.

Jon

----
Learn to program using Linux assembly language
http://www.cafeshops.com/bartlettpublish.8640017


Relevant Pages

  • [opensuse] share samba and pam_mount
    ... This server is a member of AD. ... Users' local configuration file (if there is none, ... Individual users may define additional volumes to mount if allowed by ... You can specify either absolute paths, or relative ones, in which case ...
    (SuSE)
  • Re: Email Programming using System.Web.Mail
    ... With System.Web.Mail,, the book for the SmtpMail class says that if you do not specify a value for SmtpServer then it uses the local SMTP server. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: RCP from VMS to Unix
    ... using RCP to recursively transfer files from a VMS host to a Unix server. ... specify in the UNIX file specification. ... alp $ show default ...
    (comp.os.vms)
  • Re: Email Programming using System.Web.Mail
    ... configuration first but if that doesn't specify the appropriate ... configuration files, an exception would be thrown when you call the ... The moment I specify a valid server then it works: ... It will only connect to an 'up-line' SMTP ...
    (microsoft.public.dotnet.languages.vb)
  • Re: postfix cant send and receive mails (SOLVED) - resend
    ... Me neither --- I'm somewhat unhappy with the postfix documentation I ... The documentation says: "The SMTP server ... But what else do you specify in the table? ... That would indicate that no mail is delivered to virtual domains. ...
    (Debian-User)