All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta.com>
To: "Loke, Chetan" <Chetan.Loke@netscout.com>
Cc: Matt Domsch <Matt_Domsch@Dell.com>,
	Narendra_K@Dell.com, netdev@vger.kernel.org,
	Charles_Rose@Dell.com, Jordan_Hargrave@Dell.com,
	linux-pci@vger.kernel.org, linux-hotplug@vger.kernel.org
Subject: Re: [PATCH] Add firmware label support to iproute2
Date: Thu, 26 Aug 2010 15:21:38 +0000	[thread overview]
Message-ID: <20100826082138.76bcd315@nehalam> (raw)
In-Reply-To: <D3F292ADF945FB49B35E96C94C2061B90CEAD321@nsmail.netscout.com>

On Thu, 26 Aug 2010 11:17:51 -0400
"Loke, Chetan" <Chetan.Loke@netscout.com> wrote:

> What if we extend 'IFNAMSIZ'(beyond 16 chars. Older apps don't need to
> worry because they have been working w/ 16 chars anyways) and also get
> ifalias to work in udev(Or is ifalias a bad idea?)?
> 
> Chetan
>
That is  non-starter for the ioctl() style interface.

struct ifreq {
#define IFHWADDRLEN	6
	union
	{
		char	ifrn_name[IFNAMSIZ];		/* if name, e.g. "en0" */
	} ifr_ifrn;
	
	union {
		struct	sockaddr ifru_addr;
		struct	sockaddr ifru_dstaddr;
		struct	sockaddr ifru_broadaddr;
		struct	sockaddr ifru_netmask;
		struct  sockaddr ifru_hwaddr;
		short	ifru_flags;
		int	ifru_ivalue;
		int	ifru_mtu;
		struct  ifmap ifru_map;
		char	ifru_slave[IFNAMSIZ];	/* Just fits the size */
		char	ifru_newname[IFNAMSIZ];
		void __user *	ifru_data;
		struct	if_settings ifru_settings;
	} ifr_ifru;
};

Applications do:
   	strncpy(ifr.ifr_name, "my name", IFNAMSIZ);
	ioctl(fd, SIOCGHWADDR, &ifr)


WARNING: multiple messages have this Message-ID (diff)
From: Stephen Hemminger <shemminger@vyatta.com>
To: "Loke, Chetan" <Chetan.Loke@netscout.com>
Cc: "Matt Domsch" <Matt_Domsch@Dell.com>, <Narendra_K@Dell.com>,
	<netdev@vger.kernel.org>, <Charles_Rose@Dell.com>,
	<Jordan_Hargrave@Dell.com>, <linux-pci@vger.kernel.org>,
	<linux-hotplug@vger.kernel.org>
Subject: Re: [PATCH] Add firmware label support to iproute2
Date: Thu, 26 Aug 2010 08:21:38 -0700	[thread overview]
Message-ID: <20100826082138.76bcd315@nehalam> (raw)
In-Reply-To: <D3F292ADF945FB49B35E96C94C2061B90CEAD321@nsmail.netscout.com>

On Thu, 26 Aug 2010 11:17:51 -0400
"Loke, Chetan" <Chetan.Loke@netscout.com> wrote:

> What if we extend 'IFNAMSIZ'(beyond 16 chars. Older apps don't need to
> worry because they have been working w/ 16 chars anyways) and also get
> ifalias to work in udev(Or is ifalias a bad idea?)?
> 
> Chetan
>
That is  non-starter for the ioctl() style interface.

struct ifreq {
#define IFHWADDRLEN	6
	union
	{
		char	ifrn_name[IFNAMSIZ];		/* if name, e.g. "en0" */
	} ifr_ifrn;
	
	union {
		struct	sockaddr ifru_addr;
		struct	sockaddr ifru_dstaddr;
		struct	sockaddr ifru_broadaddr;
		struct	sockaddr ifru_netmask;
		struct  sockaddr ifru_hwaddr;
		short	ifru_flags;
		int	ifru_ivalue;
		int	ifru_mtu;
		struct  ifmap ifru_map;
		char	ifru_slave[IFNAMSIZ];	/* Just fits the size */
		char	ifru_newname[IFNAMSIZ];
		void __user *	ifru_data;
		struct	if_settings ifru_settings;
	} ifr_ifru;
};

Applications do:
   	strncpy(ifr.ifr_name, "my name", IFNAMSIZ);
	ioctl(fd, SIOCGHWADDR, &ifr)


  reply	other threads:[~2010-08-26 15:21 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-12 17:35 [PATCH] Add firmware label support to iproute2 Narendra K
2010-08-12 18:10 ` Stephen Hemminger
2010-08-12 18:12 ` Stephen Hemminger
2010-08-13 12:36   ` Narendra_K
2010-08-18 21:41     ` Stephen Hemminger
2010-08-19 21:33       ` Matt Domsch
2010-08-19 21:53         ` Stephen Hemminger
2010-08-19 22:18           ` Matt Domsch
2010-08-25 22:03           ` Matt Domsch
2010-08-25 22:16             ` Greg KH
2010-08-26 14:10               ` Matt Domsch
2010-08-26  0:16             ` Stephen Hemminger
2010-08-26 15:01               ` Matt Domsch
2010-08-26 15:01                 ` Matt Domsch
2010-08-26 15:17                 ` Loke, Chetan
2010-08-26 15:17                   ` Loke, Chetan
2010-08-26 15:21                   ` Stephen Hemminger [this message]
2010-08-26 15:21                     ` Stephen Hemminger
2010-08-26 15:38                     ` Loke, Chetan
2010-08-26 15:38                       ` Loke, Chetan
2010-08-27  7:54                       ` Kay Sievers
2010-08-27  7:54                         ` Kay Sievers
2010-08-26 16:38                 ` Matt Domsch
2010-08-26 16:38                   ` Matt Domsch

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=20100826082138.76bcd315@nehalam \
    --to=shemminger@vyatta.com \
    --cc=Charles_Rose@Dell.com \
    --cc=Chetan.Loke@netscout.com \
    --cc=Jordan_Hargrave@Dell.com \
    --cc=Matt_Domsch@Dell.com \
    --cc=Narendra_K@Dell.com \
    --cc=linux-hotplug@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=netdev@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.