RE: [PATCH] Add firmware label support to iproute2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sorry, my bad.
I agree w/ your recommendation then - 
1) stuff it in ifalias(or create a new alias if net_device::ifalias is
used for snmp etc).

But how do we consume it? 
   1.1) spit it out via sysfs? But Doc/sysfsrules.txt says "Accessing
/sys/class/net/eth0/device is a bug in the application"


Chetan

> -----Original Message-----
> From: Stephen Hemminger [mailto:shemminger@xxxxxxxxxx]
> Sent: August 26, 2010 11:22 AM
> To: Loke, Chetan
> Cc: Matt Domsch; Narendra_K@xxxxxxxx; netdev@xxxxxxxxxxxxxxx;
> Charles_Rose@xxxxxxxx; Jordan_Hargrave@xxxxxxxx; linux-
> pci@xxxxxxxxxxxxxxx; linux-hotplug@xxxxxxxxxxxxxxx
> Subject: Re: [PATCH] Add firmware label support to iproute2
> 
> On Thu, 26 Aug 2010 11:17:51 -0400
> "Loke, Chetan" <Chetan.Loke@xxxxxxxxxxxx> 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)

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux