[PATCH] linux: net/if.h

Jeff Johnston jjohnstn@redhat.com
Wed Mar 29 23:18:00 GMT 2006


Patch checked in with modification.  You forgot about IFF_SMART 
reference inside IFF_CANTCHANGE.  I replaced IFF_SMART with IFF_NOTRAILERS.

-- Jeff J.

Shaun Jackman wrote:
> 2006-03-20  Shaun Jackman  <sjackman@gmail.com>
> 
> 	* libc/sys/linux/include/net/if.h: Include sys/socket.h for
> 	struct sockaddr.
> 	(IFF_SMART): Replace this define with IFF_NOTRAILERS.
> 	(IFF_NOTRAILERS): New define.
> 	(struct ifreq): Add ifru_netmask.
> 	(ifr_netmask): New define.
> 
> Index: libc/sys/linux/include/net/if.h
> ===================================================================
> RCS file: /cvs/src/src/newlib/libc/sys/linux/include/net/if.h,v
> retrieving revision 1.1
> diff -u -u -r1.1 if.h
> --- libc/sys/linux/include/net/if.h	28 May 2003 22:04:35 -0000	1.1
> +++ libc/sys/linux/include/net/if.h	20 Mar 2006 22:17:29 -0000
> @@ -38,6 +38,7 @@
>  #define	_NET_IF_H_
> 
>  #include <sys/queue.h>
> +#include <sys/socket.h>
> 
>  /*
>   * <net/if.h> does not depend on <sys/time.h> on most other systems.  This
> @@ -122,7 +123,7 @@
>  #define	IFF_DEBUG	0x4		/* turn on debugging */
>  #define	IFF_LOOPBACK	0x8		/* is a loopback net */
>  #define	IFF_POINTOPOINT	0x10		/* interface is point-to-point link */
> -#define	IFF_SMART	0x20		/* interface manages own routes */
> +#define	IFF_NOTRAILERS	0x20		/* avoid use of trailers */
>  #define	IFF_RUNNING	0x40		/* resources allocated */
>  #define	IFF_NOARP	0x80		/* no address resolution protocol */
>  #define	IFF_PROMISC	0x100		/* receive all packets */
> @@ -227,6 +228,7 @@
>  		struct	sockaddr ifru_addr;
>  		struct	sockaddr ifru_dstaddr;
>  		struct	sockaddr ifru_broadaddr;
> +		struct	sockaddr ifru_netmask;
>  		short	ifru_flags[2];
>  		short	ifru_index;
>  		int	ifru_metric;
> @@ -239,6 +241,7 @@
>  #define	ifr_addr	ifr_ifru.ifru_addr	/* address */
>  #define	ifr_dstaddr	ifr_ifru.ifru_dstaddr	/* other end of p-to-p link */
>  #define	ifr_broadaddr	ifr_ifru.ifru_broadaddr	/* broadcast address */
> +#define	ifr_netmask	ifr_ifru.ifru_netmask	/* interface net mask	*/
>  #define	ifr_flags	ifr_ifru.ifru_flags[0]	/* flags */
>  #define	ifr_prevflags	ifr_ifru.ifru_flags[1]	/* flags */
>  #define	ifr_metric	ifr_ifru.ifru_metric	/* metric */



More information about the Newlib mailing list