/* IPX support library Copyright (C) 1994, 1995 Ales Dryak This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef __IPXUTIL_H__ #define __IPXUTIL_H__ #include #include #define IPX_RIP_PTYPE (0x01) #define IPX_SAP_PTYPE (0x04) #define IPX_SAP_PORT (0x0452) #define IPX_RIP_PORT (0x0453) #define IPX_SAP_GENERAL_QUERY (0x0001) #define IPX_SAP_GENERAL_RESPONSE (0x0002) #define IPX_SAP_NEAREST_QUERY (0x0003) #define IPX_SAP_NEAREST_RESPONSE (0x0004) #define IPX_SAP_FILE_SERVER (0x0004) #define IPX_RIP_REQUEST (0x1) #define IPX_RIP_RESPONSE (0x2) struct ipx_rip_packet { __u16 operation __attribute__ ((packed)); struct ipx_rt_def { __u32 network __attribute__ ((packed)); __u16 hops __attribute__ ((packed)); __u16 ticks __attribute__ ((packed)); } rt[1] __attribute__ ((packed)); }; #define IPX_BROADCAST_NODE "\xff\xff\xff\xff\xff\xff" #define IPX_THIS_NODE "\0\0\0\0\0\0" #ifndef IPX_NODE_LEN #define IPX_NODE_LEN (6) #endif typedef unsigned long IPXNet; typedef unsigned short IPXPort; typedef unsigned char IPXNode[IPX_NODE_LEN]; void ipx_print_node(IPXNode node); void ipx_print_network(IPXNet net); void ipx_print_port(IPXPort port); void ipx_print_saddr(struct sockaddr_ipx* sipx); static __inline__ void ipx_assign_node(IPXNode dest, IPXNode src) { memcpy(dest, src, IPX_NODE_LEN); } #endif