This is the mail archive of the libc-hacker@sourceware.cygnus.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]

if_packet


This patch should fix the problem with multiple definitions that Zack reported 
for the <net/if_packet.h> header.

p.

1998-11-05  Philip Blundell  <philb@gnu.org>

	* sysdeps/unix/sysv/linux/net/if_packet.h: Don't include kernel
	header; it defines too much.  Provide a local definition of struct
	sockaddr_pkt and a comment advising against its use.

--- libc/sysdeps/unix/sysv/linux/net/if_packet.h~	Sun Jun 28 17:53:03 1998
+++ libc/sysdeps/unix/sysv/linux/net/if_packet.h	Thu Nov  5 22:07:26 1998
@@ -1,5 +1,5 @@
 /* Definitions for use with Linux SOCK_PACKET sockets.
-   Copyright (C) 1997 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -20,7 +20,18 @@
 #ifndef __IF_PACKET_H
 #define __IF_PACKET_H
 
-/* For now we can just use the kernel definitions.  */
-#include <linux/if_packet.h>
+#include <features.h>
+#include <bits/sockaddr.h>
+
+/* This is the SOCK_PACKET address structure as used in Linux 2.0.
+   From Linux 2.1 the AF_PACKET interface is preferred and you should
+   consider using it in place of this one.  */
+
+struct sockaddr_pkt
+  {
+    __SOCKADDR_COMMON (spkt_);
+    unsigned char spkt_device[14];
+    unsigned short spkt_protocol;
+  };
 
 #endif




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