]> arthur.barton.de Git - netatalk.git/blobdiff - etc/atalkd/multicast.c
Remove bdb env on exit
[netatalk.git] / etc / atalkd / multicast.c
index c17aa08b34b62b5b6596b20791e37d81bca7fe98..3b7785ce1c866d5cb9f30b9be99bf1dd3e6da25e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: multicast.c,v 1.9 2002-01-04 04:45:47 sibaz Exp $
+ * $Id: multicast.c,v 1.13 2009-10-14 01:38:28 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved. See COPYRIGHT.
@@ -41,6 +41,7 @@
 #include "rtmp.h"
 #include "zip.h"
 #include "main.h"
+#include "multicast.h"
 
 
 static const unsigned char     ethermulti[ 6 ] = {
@@ -303,32 +304,6 @@ static const unsigned char ethermultitab[ 253 ][ 6 ] = {
     { 0x09, 0x00, 0x07, 0x00, 0x00, 0xfc, },
 };
 
-static const unsigned char     tokenmulti[ 6 ] = {
-    0xc0, 0x00, 0x40, 0x00, 0x00, 0x00,
-};
-
-static const unsigned char     tokenmultitab[ 19 ][ 6 ] = {
-    { 0xc0, 0x00, 0x00, 0x00, 0x08, 0x00, },
-    { 0xc0, 0x00, 0x00, 0x00, 0x10, 0x00, },
-    { 0xc0, 0x00, 0x00, 0x00, 0x20, 0x00, },
-    { 0xc0, 0x00, 0x00, 0x00, 0x40, 0x00, },
-    { 0xc0, 0x00, 0x00, 0x00, 0x80, 0x00, },
-    { 0xc0, 0x00, 0x00, 0x01, 0x00, 0x00, },
-    { 0xc0, 0x00, 0x00, 0x02, 0x00, 0x00, },
-    { 0xc0, 0x00, 0x00, 0x04, 0x00, 0x00, },
-    { 0xc0, 0x00, 0x00, 0x08, 0x00, 0x00, },
-    { 0xc0, 0x00, 0x00, 0x10, 0x00, 0x00, },
-    { 0xc0, 0x00, 0x00, 0x20, 0x00, 0x00, },
-    { 0xc0, 0x00, 0x00, 0x40, 0x00, 0x00, },
-    { 0xc0, 0x00, 0x00, 0x80, 0x00, 0x00, },
-    { 0xc0, 0x00, 0x01, 0x00, 0x00, 0x00, },
-    { 0xc0, 0x00, 0x02, 0x00, 0x00, 0x00, },
-    { 0xc0, 0x00, 0x04, 0x00, 0x00, 0x00, },
-    { 0xc0, 0x00, 0x08, 0x00, 0x00, 0x00, },
-    { 0xc0, 0x00, 0x10, 0x00, 0x00, 0x00, },
-    { 0xc0, 0x00, 0x20, 0x00, 0x00, 0x00, },
-};
-
 
 
 /* configure multicast for a given named interface */
@@ -356,9 +331,7 @@ int addmulti(const char *name, const unsigned char *data)
 }
 
 static u_int16_t
-atalk_cksum( data, len )
-    u_char     *data;
-    int                len;
+atalk_cksum( u_char *data, int len)
 {
     u_char     *end;
     u_int32_t  cksum = 0;
@@ -385,8 +358,7 @@ atalk_cksum( data, len )
  * alike.)
  */
 int
-zone_bcast( zt )
-     struct ziptab     *zt;
+zone_bcast( struct ziptab *zt)
 {
     u_char             uname[ 32 ];
     u_int16_t          cksum;
@@ -394,7 +366,7 @@ zone_bcast( zt )
 
     if (!zt->zt_bcast &&
        (zt->zt_bcast = (u_char *) malloc(sizeof( ethermulti ))) == NULL) {
-       LOG(log_error, logtype_default, "zone_bcast malloc: %s", strerror(errno) );
+       LOG(log_error, logtype_atalkd, "zone_bcast malloc: %s", strerror(errno) );
        return -1;
      }