Permalink
Browse files

MIP6: mip6 id-18 supported (todo: L/S bit, refresh opt, BA authdata a…

…nd etc...)
  • Loading branch information...
1 parent 1e34e17 commit c37ea764edbcf8d8b78a95ff9e62cc7afa32399a k-sugyou committed Aug 5, 2002
View
@@ -1,4 +1,4 @@
-/* $KAME: icmp6.h,v 1.72 2002/06/09 16:29:54 itojun Exp $ */
+/* $KAME: icmp6.h,v 1.73 2002/08/05 11:49:16 k-sugyou Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -318,29 +318,28 @@ struct ind_neighbor_advert { /* inverse neighbor advertisement */
struct ha_discov_req { /* HA Address Discovery Request */
struct icmp6_hdr ha_dreq_hdr;
-#ifdef MIP6_DRAFT13
- u_int32_t ha_dreq_reserved1;
u_int32_t ha_dreq_reserved2;
- struct in6_addr ha_dreq_home; /* MN home address */
-#endif /* MIP6_DRAFT13 */
+ u_int32_t ha_dreq_reserved3;
} __attribute__((__packed__));
#define discov_req_type ha_dreq_hdr.icmp6_type
#define discov_req_code ha_dreq_hdr.icmp6_code
#define discov_req_cksum ha_dreq_hdr.icmp6_cksum
#define discov_req_id ha_dreq_hdr.icmp6_data16[0]
+#define discov_req_reserved1 ha_dreq_hdr.icmp6_data16[1]
struct ha_discov_rep { /* HA Address Discovery Reply */
struct icmp6_hdr ha_drep_hdr;
- u_int32_t ha_drep_reserved1;
u_int32_t ha_drep_reserved2;
+ u_int32_t ha_drep_reserved3;
/* could be followed by Home Agent addresses */
} __attribute__((__packed__));
#define discov_rep_type ha_drep_hdr.icmp6_type
#define discov_rep_code ha_drep_hdr.icmp6_code
#define discov_rep_cksum ha_drep_hdr.icmp6_cksum
#define discov_rep_id ha_drep_hdr.icmp6_data16[0]
+#define discov_rep_reserved1 ha_drep_hdr.icmp6_data16[1]
struct mobile_prefix_solicit { /* Mobile Prefix Solicitation */
struct icmp6_hdr mp_sol_hdr;
@@ -349,7 +348,8 @@ struct mobile_prefix_solicit { /* Mobile Prefix Solicitation */
#define mp_sol_type mp_sol_hdr.icmp6_type
#define mp_sol_code mp_sol_hdr.icmp6_code
#define mp_sol_cksum mp_sol_hdr.icmp6_cksum
-#define mp_sol_reserved mp_sol_hdr.icmp6_data32[0]
+#define mp_sol_id mp_sol_hdr.icmp6_data16[0]
+#define mp_sol_reserved mp_sol_hdr.icmp6_data16[1]
struct mobile_prefix_advert { /* Mobile Prefix Advertisement */
struct icmp6_hdr mp_adv_hdr;
@@ -358,7 +358,8 @@ struct mobile_prefix_advert { /* Mobile Prefix Advertisement */
#define mp_adv_type mp_adv_hdr.icmp6_type
#define mp_adv_code mp_adv_hdr.icmp6_code
#define mp_adv_cksum mp_adv_hdr.icmp6_cksum
-#define mp_adv_opts mp_adv_hdr.icmp6_data8
+#define mp_adv_id mp_adv_hdr.icmp6_data16[0]
+#define mp_adv_opts mp_adv_hdr.icmp6_data16[1]
struct nd_opt_hdr { /* Neighbor discovery option header */
u_int8_t nd_opt_type;
View
@@ -1,4 +1,4 @@
-/* $KAME: ip6.h,v 1.31 2002/06/19 12:30:05 t-momose Exp $ */
+/* $KAME: ip6.h,v 1.32 2002/08/05 11:49:16 k-sugyou Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -300,7 +300,7 @@ struct ip6_mobility {
#define IP6M_BINDING_ERROR 0x0700
#endif /* BYTE_ORDER == LITTLE_ENDIAN */
-/* Binding Request message */
+/* Binding Refresh Request (BRR) message */
struct ip6m_binding_request {
u_int8_t ip6mr_pproto;
u_int8_t ip6mr_len;
@@ -317,7 +317,7 @@ struct ip6m_home_test_init {
u_int16_t ip6mhi_type;
u_int16_t ip6mhi_cksum;
u_int16_t ip6mhi_reserved;
- u_int32_t ip6mhi_mobile_cookie;
+ u_int8_t ip6mhi_hot_cookie[8];
/* followed by mobility options */
} __attribute__((__packed__));
@@ -328,7 +328,7 @@ struct ip6m_careof_test_init {
u_int16_t ip6mci_type;
u_int16_t ip6mci_cksum;
u_int16_t ip6mci_reserved;
- u_int32_t ip6mci_mobile_cookie;
+ u_int8_t ip6mci_cot_cookie[8];
/* followed by mobility options */
} __attribute__((__packed__));
@@ -338,11 +338,9 @@ struct ip6m_home_test {
u_int8_t ip6mh_len;
u_int16_t ip6mh_type;
u_int16_t ip6mh_cksum;
- u_int16_t ip6mh_reserved0;
u_int16_t ip6mh_nonce_index; /* idx of the CN nonce list array */
- u_int16_t ip6mh_reserved1;
- u_int32_t ip6mh_mobile_cookie;
- u_int8_t ip6mh_cookie[16]; /* K0 cookie */
+ u_int8_t ip6mh_hot_cookie[8];
+ u_int8_t ip6mh_cookie[8]; /* K0 cookie */
/* followed by mobility options */
} __attribute__((__packed__));
@@ -352,26 +350,22 @@ struct ip6m_careof_test {
u_int8_t ip6mc_len;
u_int16_t ip6mc_type;
u_int16_t ip6mc_cksum;
- u_int16_t ip6mc_reserved0;
u_int16_t ip6mc_nonce_index; /* idx of the CN nonce list array */
- u_int16_t ip6mc_reserved1;
- u_int32_t ip6mc_mobile_cookie;
- u_int8_t ip6mc_cookie[16]; /* K1 cookie */
+ u_int8_t ip6mc_cot_cookie[8];
+ u_int8_t ip6mc_cookie[8]; /* K1 cookie */
/* followed by mobility options */
} __attribute__((__packed__));
-/* Binding Update message */
+/* Binding Update (BU) message */
struct ip6m_binding_update {
u_int8_t ip6mu_pproto;
u_int8_t ip6mu_len;
u_int16_t ip6mu_type;
u_int16_t ip6mu_cksum;
- u_int8_t ip6mu_flags;
- u_int8_t ip6mu_reserved0;
u_int16_t ip6mu_seqno;
- u_int16_t ip6mu_reserved1;
- u_int32_t ip6mu_lifetime;
- struct in6_addr ip6mu_addr;
+ u_int8_t ip6mu_flags;
+ u_int8_t ip6mu_reserved;
+ u_int16_t ip6mu_lifetime;
/* followed by mobility options */
} __attribute__((__packed__));
@@ -380,54 +374,62 @@ struct ip6m_binding_update {
#define IP6MU_HOME 0x40 /* Home Registration */
#define IP6MU_SINGLE 0x20 /* Update the specified address only */
#define IP6MU_DAD 0x10 /* Perform Duplicate Address Detection */
+#define IP6MU_LINK 0x08 /* Link-Local Address Compatibility */
-/* Binding Ack message */
+/* Binding Acknowledgement (BA) message */
struct ip6m_binding_ack {
u_int8_t ip6ma_pproto;
u_int8_t ip6ma_len;
u_int16_t ip6ma_type;
u_int16_t ip6ma_cksum;
u_int8_t ip6ma_status;
- u_int8_t ip6ma_reserved0;
+ u_int8_t ip6ma_reserved;
u_int16_t ip6ma_seqno;
- u_int16_t ip6ma_reserved1;
- u_int32_t ip6ma_lifetime;
- u_int32_t ip6ma_refresh;
+ u_int16_t ip6ma_lifetime;
/* followed by mobility options */
} __attribute__((__packed__));
-/* Binding Error message */
+/* Binding Error (BE) message */
struct ip6m_binding_error {
u_int8_t ip6me_pproto;
u_int8_t ip6me_len;
u_int16_t ip6me_type;
u_int16_t ip6me_cksum;
u_int8_t ip6me_status;
- u_int8_t ip6me_reserved0;
+ u_int8_t ip6me_reserved;
struct in6_addr ip6me_addr;
/* followed by mobility options */
} __attribute__((__packed__));
/* Mobility options */
-#define IP6MOPT_PAD1 0
-#define IP6MOPT_PADN 1
-#define IP6MOPT_UID 2
-#define IP6MOPT_ALTCOA 3
-#define IP6MOPT_NONCE 4
-#define IP6MOPT_AUTHDATA 5
+struct ip6m_opt {
+ u_int8_t ip6mo_type;
+ u_int8_t ip6mo_len;
+ /* followed by option data */
+} __attribute__((__packed__));
+
+/* Mobility option type */
+#define IP6MOPT_PAD1 0 /* Pad1 */
+#define IP6MOPT_PADN 1 /* PadN */
+#define IP6MOPT_UID 2 /* Unique Identifier */
+#define IP6MOPT_ALTCOA 3 /* Alternate Care-of Address */
+#define IP6MOPT_NONCE 4 /* Nonce Indices */
+#define IP6MOPT_AUTHDATA 5 /* Binding Authorization Data */
+/* 6 reserved */
+#define IP6MOPT_REFRESH 7 /* Binding Refresh Advice */
/* Unique Identifier */
struct ip6m_opt_uid {
u_int8_t ip6mou_type;
u_int8_t ip6mou_len;
- u_int8_t ip6mou_id[2];
+ u_int8_t ip6mou_id[2]; /* Unique Identifier */
} __attribute__((__packed__));
/* Alternate Care-of Address */
struct ip6m_opt_altcoa {
u_int8_t ip6moa_type;
u_int8_t ip6moa_len;
- u_int8_t addr[16];
+ u_int8_t addr[16]; /* Alternate Care-of Address */
} __attribute__((__packed__));
/* Nonce Indices */
@@ -445,6 +447,13 @@ struct ip6m_opt_authdata {
/* followed by authenticator data */
} __attribute__((__packed__));
+/* Binding Refresh Advice */
+struct ip6m_opt_refresh {
+ u_int8_t ip6mor_type;
+ u_int8_t ip6mor_len;
+ u_int8_t ip6mor_refresh[2]; /* Refresh Interval */
+} __attribute__((__packed__));
+
/*
* Internet implementation parameters.
*/
Oops, something went wrong.

0 comments on commit c37ea76

Please sign in to comment.