[pisa-src] r1263 - trunk/include/packet.h

  • From: Thomas Jansen <mithi@xxxxxxxxx>
  • To: pisa-src@xxxxxxxxxxxxx
  • Date: Wed, 21 Oct 2009 17:01:02 +0200

Author: tjansen
Date: Wed Oct 21 17:01:02 2009
New Revision: 1263

Log:
Removed obsolete preauth structures and functions.

Modified:
   trunk/include/packet.h

Modified: trunk/include/packet.h
==============================================================================
--- trunk/include/packet.h      Wed Oct 21 17:00:29 2009        (r1262)
+++ trunk/include/packet.h      Wed Oct 21 17:01:02 2009        (r1263)
@@ -47,36 +47,6 @@
 } __attribute__ ((packed)) pisa_tlv_common;
 
 /**
- * a set of DHCP server information
- */
-typedef struct {
-       /**
-        * IP address of NAR, to be used as the default gateway
-        */
-       struct in_addr ipaddr_nar;
-
-       /**
-        * IP address of the client wlan interface, obtained via DHCP lookup
-        */
-       struct in_addr ipaddr_client;
-
-       /**
-        * netmask of the client wlan interface, obtained via DHCP lookup
-        */
-       struct in_addr netmask_client;
-
-       /**
-        * IP address of the DNS server
-        */
-       struct in_addr ipaddr_dnssrv;
-
-       /**
-        * DHCP lease information, obtained via DHCP lookup
-        */
-       uint32_t        dhcp_lease;
-} pisa_dhcp_info;
-
-/**
  * Header or identifier for tunnel control packets.
  */
 typedef enum {
@@ -91,63 +61,6 @@
 } pisatun_pkttype;
 
 /**
- * Header or identifier for neighbor exchange packets. The first 2 bytes of
- * each packet mean pisand_pkttype being fit to the size of pisa_tlv_type,
- * to define the type of the packet.
- * These constants are to be used for pisand_packet::type.
- * PISA_PKTTYPE_NE_* constants start from 257 = 0x0101.
- */
-typedef enum {
-       PISA_PKTTYPE_NE_REQUEST = 257,  /* NE req from AR to AR */
-       PISA_PKTTYPE_NE_RESPONSE,       /* NE res from AR to AR */
-       PISA_PKTTYPE_NE_TIMEOUT,        /* neighbor exchange timeout */
-       PISA_PKTTYPE_NE_UNKNOWN,        /* unknown neighbor exchange packet */
-} pisand_pkttype;
-
-/**
- * Header or identifier for pre-authentication packets. The first 2 bytes of
- * each packet mean pisapa_pkttype being fit to the size of pisa_tlv_type,
- * to define the type of the packet.
- * These constants are to be used for pisapa_packet::type.
- * PISA_PKTTYPE_PA_* constants start from 513 = 0x0201.
- */
-typedef enum {
-       PISA_PKTTYPE_PA_REQUEST = 513,  /* preauth req from MG to AR */
-       PISA_PKTTYPE_PA_RESPONSE,       /* preauth res from AR to MG */
-       PISA_PKTTYPE_PA_TIMEOUT,
-       PISA_PKTTYPE_PA_UNKNOWN,
-} pisapa_pkttype;
-
-/**
- * Header or identifier for binding update packets. The first 2 bytes of
- * each packet mean pisabu_pkttype being fit to the size of pisa_tlv_type,
- * to define the type of the packet.
- * These constants are to be used for pisabu_packet::type.
- * PISA_PKTTYPE_BU_* constants start from 769 = 0x0301.
- */
-typedef enum {
-       PISA_PKTTYPE_BU_REQUEST = 769,  /* binding update req from MG to AR */
-       PISA_PKTTYPE_BU_RESPONSE,       /* binding update res from AR to MG */
-       PISA_PKTTYPE_BU_TIMEOUT,
-       PISA_PKTTYPE_BU_UNKNOWN,
-} pisabu_pkttype;
-
-/**
- * Header or identifier for binding update packets. The first 2 bytes of
- * each packet mean pisavrfy_pkttype being fit to the size of pisa_tlv_type,
- * to define the type of the packet.
- * These constants are to be used for pisavrfy_packet::type.
- * PISA_PKTTYPE_VRFY_* constants start from 1025 = 0x0401.
- */
-typedef enum {
-       PISA_PKTTYPE_VRFY_REQUEST1 = 1025,      /* token verify request1 from 
TR to AR */
-       PISA_PKTTYPE_VRFY_RESPONSE1,    /* token verify response1 from AR to TR 
*/
-       PISA_PKTTYPE_VRFY_REQUEST2,     /* token verify request2 from TR to AR 
*/
-       PISA_PKTTYPE_VRFY_RESPONSE2,    /* token verify response2 from AR to TR 
*/
-       PISA_PKTTYPE_VRFY_UNKNOWN,
-} pisavrfy_pkttype;
-
-/**
  * Header or identifier for common PISA packets.
  */
 typedef enum {
@@ -167,90 +80,6 @@
 } __attribute__ ((packed)) pisa_packet_common;
 
 /**
- * the payload part that is specific to neighbor exchange request packets
- */
-typedef struct {
-       uint32_t        reserved;
-} pisa_payload_nereq;
-
-/**
- * the payload part that is specific to neighbor exchange response packets
- */
-typedef struct {
-       pisa_ssid       ssid;
-       struct in_addr  ipaddr_nar;
-       pisa_token      token;
-} pisa_payload_neres;
-
-/**
- * the payload part that is specific to pre-authentication request packets
- */
-typedef struct {
-       uint32_t        reserved;
-} pisa_payload_pareq;
-
-/**
- * the payload part that is specific to pre-authentication response packets
- */
-typedef struct {
-       struct in_addr  ipaddr_nar;
-       pisa_token      token;
-} pisa_payload_pares;
-
-/**
- * the payload part that is specific to binding update request packets
- */
-typedef struct {
-       char    ssid[MAX_SSID+1];
-       pisa_common_addr ipaddr_nar;
-       pisa_token      token;
-} pisa_payload_bureq;
-
-/**
- * the payload part that is specific to binding update response packets
- */
-typedef struct {
-       char    ssid[MAX_SSID+1];
-       pisa_dhcp_info  dhcp_info;
-} pisa_payload_bures;
-
-/**
- * the payload part that is specific to token verify request1 packets
- */
-typedef struct {
-       pisa_token_hash token_hash;
-} __attribute__ ((packed)) pisa_payload_vrfyreq1;
-
-/**
- * the payload part that is specific to token verify response1 packets
- */
-typedef struct {
-       pisa_puzzle     puzzle;
-       pisa_nonce      nonce;
-       pisa_token      token;
-       pisa_generic_hash       payload_hash;
-} __attribute__ ((packed)) pisa_payload_vrfyres1;
-
-/**
- * the payload part that is specific to token verify request2 packets
- */
-typedef struct {
-       pisa_cert       cert;
-       pisa_solution   solution;
-       pisa_nonce      nonce;
-       pisa_generic_hash       nonce_hash;
-       pisa_generic_hash       payload_hash;
-} __attribute__ ((packed)) pisa_payload_vrfyreq2;
-
-/**
- * the payload part that is specific to token verify response2 packets
- */
-typedef struct {
-       pisa_dhcp_info  dhcp_info;
-       pisa_generic_hash       payload_hash;
-} __attribute__ ((packed)) pisa_payload_vrfyres2;
-
-/**
  * Connection type:
  *
  * Relay is used for the trust point that routes internet traffic. At most one
@@ -287,21 +116,6 @@
 } __attribute__ ((packed)) pisa_payload_registerack;
 
 /**
- * core information of the token verify procedure
- */
-typedef struct {
-       pisa_ssid       ssid;
-       pisa_puzzle     puzzle;
-       pisa_solution   solution;
-       pisa_nonce      nonce;
-       pisa_cert       cert;
-       pisa_token      token;
-       pisa_dhcp_info  dhcp_info;
-       struct in6_addr hits;
-       struct in6_addr hitr;
-} pisa_vrfyinfo;
-
-/**
  * Basic layout of a general PISA packet
  */
 typedef struct pisa_packet {
@@ -313,44 +127,11 @@
                pisa_payload_register reg;
                pisa_payload_registerack reg_ack;
 
-               pisa_payload_nereq nereq;
-               pisa_payload_neres neres;
-
-               pisa_payload_pareq pareq;
-               pisa_payload_pares pares;
-
-               pisa_payload_bureq bureq;
-               pisa_payload_bures bures;
-
-               pisa_payload_vrfyreq1 vrfyreq1;
-               pisa_payload_vrfyres1 vrfyres1;
-               pisa_payload_vrfyreq2 vrfyreq2;
-               pisa_payload_vrfyres2 vrfyres2;
-
                char data[MAX_PACKET_BUFFER];
        } body;
 } __attribute__ ((packed)) pisa_packet;
 
-/**
- * As set of function handlers for PISA packets.
- */
-typedef struct {
-       int (*handle_nereq)(void *entry, pisa_packet *pkt);
-       int (*handle_neres)(void *entry, pisa_packet *pkt);
-       int (*handle_pareq)(void *entry, pisa_packet *pkt);
-       int (*handle_pares)(void *entry, pisa_packet *pkt);
-       int (*handle_bureq)(void *entry, pisa_packet *pkt);
-       int (*handle_bures)(void *entry, pisa_packet *pkt);
-       int (*handle_vrfyreq1)(void *entry, pisa_packet *pkt);
-       int (*handle_vrfyres1)(void *entry, pisa_packet *pkt);
-       int (*handle_vrfyreq2)(void *entry, pisa_packet *pkt);
-       int (*handle_vrfyres2)(void *entry, pisa_packet *pkt);
-} pisa_packet_handle_func_set;
-
 int is_pisatun_packet(const char *data);
-int is_pisane_packet(const char *data);
-int is_pisapa_packet(const char *data);
-int is_pisabu_packet(const char *data);
 
 void pisa_send_control_packet_ipv4(int fd, struct sockaddr_in* addr, 
pisa_packet *p);
 void pisa_send_control_packet_ipv6(int fd, struct sockaddr_in6* addr, 
pisa_packet *p);

Other related posts:

  • » [pisa-src] r1263 - trunk/include/packet.h - Thomas Jansen