[isisd] Add support for Solaris DLPI

2007-08-07 James Carlson <james.d.carlson@sun.com>

	* configure.ac: Added support for separate link-layer access
	  mechanisms in isisd.
	* isis_network.c: split up into isis_bpf.c, isis_dlpi.c, and
	  isis_pfpacket.c, selected by autoconf, and added DLPI support.
	* (general) Fixed to allow compilation and use on Solaris.
diff --git a/isisd/isis_circuit.c b/isisd/isis_circuit.c
index fe3eb82..af24988 100644
--- a/isisd/isis_circuit.c
+++ b/isisd/isis_circuit.c
@@ -26,6 +26,10 @@
 #include <netinet/if_ether.h>
 #endif
 
+#ifndef ETHER_ADDR_LEN
+#define	ETHER_ADDR_LEN	ETHERADDRL
+#endif
+
 #include "log.h"
 #include "memory.h"
 #include "if.h"
@@ -381,11 +385,13 @@
        * Get the Hardware Address
        */
 #ifdef HAVE_STRUCT_SOCKADDR_DL
+#ifndef SUNOS_5
       if (circuit->interface->sdl.sdl_alen != ETHER_ADDR_LEN)
 	zlog_warn ("unsupported link layer");
       else
 	memcpy (circuit->u.bc.snpa, LLADDR (&circuit->interface->sdl),
 		ETH_ALEN);
+#endif
 #else
       if (circuit->interface->hw_addr_len != ETH_ALEN)
 	{
@@ -447,10 +453,12 @@
    * Get the Hardware Address
    */
 #ifdef HAVE_STRUCT_SOCKADDR_DL
+#ifndef SUNOS_5
   if (circuit->interface->sdl.sdl_alen != ETHER_ADDR_LEN)
     zlog_warn ("unsupported link layer");
   else
     memcpy (circuit->u.bc.snpa, LLADDR (&circuit->interface->sdl), ETH_ALEN);
+#endif
 #else
   if (circuit->interface->hw_addr_len != ETH_ALEN)
     {