From: Xun Yuan <xunyuan@yahoo.com>
To: Alok Singh <alok.singh@broadcom.com>, ecos-discuss@sources.redhat.com
Subject: RE: [ECOS] IP adress Get and Set (SIOCSIFADDR problem ? )
Date: Mon, 01 Oct 2007 23:55:00 -0000 [thread overview]
Message-ID: <653491.74266.qm@web54003.mail.re2.yahoo.com> (raw)
In-Reply-To: <E06E3B7BBC07864CADE892DAF1EB0FBD01318CDE@NT-SJCA-0752.brcm.ad.broadcom.com>
Hi Alok,
Thank you so much for the quick reply!
Both SOCK_RAW and SOCK_DGRAM work. Maybe some other
options work as well. I talked to people at work. I
was told the difference with different options lies in
that when you get ip address, you will not be able to
as a non-super-user if it's set with SOCK_RAW, since
only super user has SOCK_RAW permission.
My other question is that: is there a way for the set
IP address to survive power cycle with
ioctl(SIOCSIFADDR)?
I know for sure if the host's original IP address is
dynamic. When you power off the computer and power it
back on, the DHCP in config file
(etc/sysconfig/network-scripts/ifcfg-eth0) is still
there, the system starts to get IP address from DHCP
server.
Thanks very much in advance!
pam
--- Alok Singh <alok.singh@broadcom.com> wrote:
> Yuan,
> I believe you are right. I always use SOCK_RAW.
> Are you seeing any problem with SOCK_RAW? For some
> reasons, ecos
> bootp/dhcp sever code uses SOCK_DGRAM while setting
> IP address.
>
> -ALOK
>
> -----Original Message-----
> From: ecos-discuss-owner@ecos.sourceware.org
> [mailto:ecos-discuss-owner@ecos.sourceware.org] On
> Behalf Of Xun Yuan
> Sent: Sunday, September 30, 2007 3:05 AM
> To: ecos-discuss@sources.redhat.com
> Subject: [ECOS] IP adress Get and Set (SIOCSIFADDR
> problem ? )
>
> HI There,
>
> Would someone please tell me why the second
> parameter
> in GetIP and SetIP is SOCK_DGRAM in the below link?
> Does it matter in case of getting/setting IP
> addresses
> of an interface? If it does not, any value would
> do,
> such as SOCK_RAW, SOCK_DSTREAM, right?
>
> Thanks very much in advance
> pam
>
>
>
http://www.cygwin.com/ml/ecos-discuss/2004-01/msg00130.html
>
____________________________________________________________________________________
Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s user panel and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
next prev parent reply other threads:[~2007-10-01 23:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-29 21:35 Xun Yuan
2007-09-29 21:46 ` Alok Singh
2007-10-01 23:55 ` Xun Yuan [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-01-16 17:05 sebastien Couret
2004-01-16 19:53 ` Andrew Lunn
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=653491.74266.qm@web54003.mail.re2.yahoo.com \
--to=xunyuan@yahoo.com \
--cc=alok.singh@broadcom.com \
--cc=ecos-discuss@sources.redhat.com \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).