--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: mopd uses obsolete (PF_INET,SOCK_PACKET)
- From: David Whedon <dwhedon@debian.org>
- Date: Sat, 26 May 2001 09:39:49 -0700
- Message-id: <E153h6T-0000Id-00@meow>
Package: mopd
Version: 2.5.4-5
Severity: wishlist
When mopd starts the following warning is displayed on the console:
mopd uses obsolete (PF_INET,SOCK_PACKET)
>From packet(7) :
COMPATIBILITY
       In  Linux  2.0, the only way to get a packet socket was by
       calling socket(PF_INET, SOCK_PACKET, protocol).   This  is
       still supported but strongly deprecated.  The main differ
       ence between the two methods is that SOCK_PACKET uses  the
       old  struct  sockaddr_pkt  to  specify an interface, which
       doesn't provide physical layer independence.
              struct sockaddr_pkt
              {
                  unsigned short  spkt_family;
                  unsigned char   spkt_device[14];
                  unsigned short  spkt_protocol;
              };
       spkt_family contains the device type, spkt_protocol is the
       IEEE  802.3  protocol  type as defined in <sys/if_ether.h>
       and spkt_device is the device name as  a  null  terminated
       string, e.g. eth0.
       This  structure  is obsolete and should not be used in new
       code.
Should Linux 2.0 compatibility be retained?  If so maybe this should be 
modified to use libpcap.  If not the call could perhaps be replaced like so:
--- pf-linux2.c.orig    Sat May 26 09:29:38 2001
+++ pf-linux2.c Sat May 26 09:30:36 2001
@@ -95,7 +95,7 @@
   { u_short prot;
 
     prot = ((typ == TRANS_8023) ? htons(ETH_P_802_2) : htons(protocol));
-    if ((s = socket(AF_INET, SOCK_PACKET, prot)) < 0) {
+    if ((s = socket(PF_PACKET, SOCK_RAW, prot)) < 0) {
       perror(interface);
       return(-1);
     }
I'm the current mopd maintainer and I don't consider this bug important enough 
to fix given the hazards of changing to libpcap as well as the problems 
associated with losing Linux 2.0 compatibility.  If you feel otherwise feel
free to let me know.
David
-- System Information
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux meow 2.4.4 #1 Sat May 19 09:02:27 PDT 2001 i686
Locale: LANG=C, LC_CTYPE=C
Versions of packages mopd depends on:
ii  debconf                       0.9.41     Debian configuration management sy
ii  libc6                         2.2.3-1    GNU C Library: Shared libraries an
--- End Message ---