From: Lorenzo Beretta <lory.fulgi@infinito.it>
To: linux-c-programming@vger.kernel.org
Subject: Re: use getifaddrs()
Date: Thu, 11 Oct 2012 19:16:26 +0200 [thread overview]
Message-ID: <k56ut9$ns9$1@ger.gmane.org> (raw)
In-Reply-To: <56AB56EAD87AF24C803FB693654D7A89C87CA3@adbbexch01.adbitaly.com>
On 11/10/2012 10:44, Pietro Paolini wrote:
> Hello,
>
> I'm not sure about the mailing list I should ask this.
> I am rewrite a C program in order to make it portable between differents arch and I am a bit confused regarding byte order.
>
> I am getting the list of my interfaces using the getifaddr() functions and it seems return me a list of interfaces with their IP addresses in network byte order instead of host byte order.
> It is a regular behavior or I am wrong and confused ?
>
> Many thanks,
> Pietro
> --
> To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
Regular -- I'm not sure about getifaddrs, but most (all?) socket
functions do the same, so sometimes (as in this case it sems) it's just
assumed to be the default.
In general you can just check the manpage:
1. from your system -- "man getifaddrs"
2. from the posix std online
3. from www.freebsd.org -- its manpages section actually lets you look
at manpages from a *lot* of unices (*BSD, linux, solaris, ...), it's
very very handy
prev parent reply other threads:[~2012-10-11 17:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-11 8:44 use getifaddrs() Pietro Paolini
2012-10-11 17:16 ` Lorenzo Beretta [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='k56ut9$ns9$1@ger.gmane.org' \
--to=lory.fulgi@infinito.it \
--cc=linux-c-programming@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).