This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

nss patch (getethertype)


Hi all!

I made a patch for glibc 2.2.5 version.
It add a set of getethertypeXXX calls like getprotoXXX:

struct ethertypeent
{
  char *e_name;                 /* Official ethernet type name.  */
  char **e_aliases;             /* Alias list.  */
  int e_ethertype;              /* Ethernet type number.  */
};

void setethertypeent (int __stay_open)
void endethertypeent (void)
struct ethertypeent *getethertypeent (void)
struct ethertypeent *getethertypebyname (__const char *__name)
struct ethertypeent *getethertypebynumber (int __ethertype)

and plaintext database /etc/ethertypes:
#<name>		<hexnum>	<aliases> #<comment>
IPv4            0800    	ip ip4    # Internet Protocol version 4
ARP             0806    	arp       # Address Resolution Protocol
802_1Q          8100    	8021q 1q  # 802.1Q Virtual LAN tagged frame

This functions used in ethernet frame oriented applications,
f.e. in the ebtables project
(http://www.sourceforge.net/projects/ebtables/), which kernelspace part is
included to the 2.5 linux kernels.
I successfully recompile and use patched glibc 2.2.5.
Also I succesfully applied the patch to the glibc 2.3.1 sources, but not
tested yet.

Is it possible to include the patch in the future glibc releases?
Where I can send the patch?
The patch is currently availiable on my site at
http://www.fedchik.org.ua/linux/netfilter/ebtables/glibc-2.2.5-ethertypes.patch

Best regards!
-- 
Nick Fedchik <fnm@ukrsat.com>
FNM3-RIPE (-UANIC)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]