Author: tjansen Date: Tue Oct 27 17:53:59 2009 New Revision: 1360 Log: Removed lingering preauth code. Modified: trunk/include/packet.h trunk/libpisa/packet.c Modified: trunk/include/packet.h ============================================================================== --- trunk/include/packet.h Tue Oct 27 17:48:30 2009 (r1359) +++ trunk/include/packet.h Tue Oct 27 17:53:59 2009 (r1360) @@ -28,15 +28,8 @@ #define PISA_TYPE_MASK 0xff00 #define PISA_PKTTYPE_TUN 0x0000 -#define PISA_PKTTYPE_NE 0x0100 -#define PISA_PKTTYPE_PA 0x0200 -#define PISA_PKTTYPE_BU 0x0300 -#define PISA_PKTTYPE_VRFY 0x0400 #define IS_PISATUN_PACKET(packet) is_pisatun_packet((const char *)(packet)) -#define IS_PISANE_PACKET(packet) is_pisane_packet((const char *)(packet)) -#define IS_PISAPA_PACKET(packet) is_pisapa_packet((const char *)(packet)) -#define IS_PISABU_PACKET(packet) is_pisabu_packet((const char *)(packet)) /** * a part of pisa_packet including only common fields of the TLV format. Modified: trunk/libpisa/packet.c ============================================================================== --- trunk/libpisa/packet.c Tue Oct 27 17:48:30 2009 (r1359) +++ trunk/libpisa/packet.c Tue Oct 27 17:53:59 2009 (r1360) @@ -32,70 +32,6 @@ } /** - * Check if the given buffer is a valid PISA neighbor exchange packet - * - * @param data pointer to the data to be checked - * @return TRUE if yes, FALSE if no - */ -int is_pisane_packet(const char *data) -{ - pisa_packet *pkt = (pisa_packet *)data; - - if ((pisa_get_packet_type(pkt) & PISA_TYPE_MASK) == PISA_PKTTYPE_NE) - return TRUE; - else - return FALSE; -} - -/** - * Check if the given buffer is a valid PISA pre-authentication packet - * - * @param data pointer to the data to be checked - * @return TRUE if yes, FALSE if no - */ -int is_pisapa_packet(const char *data) -{ - pisa_packet *pkt = (pisa_packet *)data; - - if ((pisa_get_packet_type(pkt) & PISA_TYPE_MASK) == PISA_PKTTYPE_PA) - return TRUE; - else - return FALSE; -} - -/** - * Check if the given buffer is a valid PISA binding update packet - * - * @param data pointer to the data to be checked - * @return TRUE if yes, FALSE if no - */ -int is_pisabu_packet(const char *data) -{ - pisa_packet *pkt = (pisa_packet *)data; - - if ((pisa_get_packet_type(pkt) & PISA_TYPE_MASK) == PISA_PKTTYPE_BU) - return TRUE; - else - return FALSE; -} - -/** - * Check if the given buffer is a valid PISA token verification packet - * - * @param data pointer to the data to be checked - * @return TRUE if yes, FALSE if no - */ -int is_pisavrfy_packet(const char *data) -{ - pisa_packet *pkt = (pisa_packet *)data; - - if ((pisa_get_packet_type(pkt) & PISA_TYPE_MASK) == PISA_PKTTYPE_VRFY) - return TRUE; - else - return FALSE; -} - -/** * Send a control packet. * @param fd file descriptor for the socket * @param addr destination address