📄 mip6_shisad.h
字号:
#ifdef MIP_MCOA u_int16_t bul_bid; /* Binding Unique Identifier */ struct binding_update_list_head bul_mcoa_head;#endif /* MIP_MCOA */};#define MIP6_BUL_STATE_DISABLE 0x01/*#define MIP6_BUL_STATE_NEEDTUNNEL (MIP6_BUL_STATE_DISABLE)*//* * it contains host information for which mnd does not run Route * Opitimization (such as RR) */struct noro_host_list { LIST_ENTRY(noro_host_list) noro_entry; struct in6_addr noro_host; int prefixlen; /* currently not supported yet */};LIST_HEAD(no_ro_head, noro_host_list);/* Home Address information (each HoA related info) */struct mip6_hoainfo { LIST_ENTRY(mip6_hoainfo) hinfo_entry; struct in6_addr hinfo_hoa; /* Home Address */ /* if_index of mip virtual interface where HoA is assigned */ u_int16_t hinfo_ifindex; u_int8_t hinfo_location; /* Location where mn is located */ u_int16_t hinfo_dhaad_id; time_t hinfo_dhaad_lastsent; u_int16_t hinfo_mps_id; time_t hinfo_mps_lastsent; struct binding_update_list_head hinfo_bul_head; /* Binding Update List */};LIST_HEAD(mip6_hinfo_list, mip6_hoainfo);#define MNINFO_MN_UNKNOWN 0x00#define MNINFO_MN_HOME 0x01#define MNINFO_MN_FOREIGN 0x02/* MIP Virtual Interface Information (each Home Link info) */struct mip6_mipif { LIST_ENTRY(mip6_mipif) mipif_entry; struct mip6_hpfx_list mipif_hprefx_head; u_int16_t mipif_ifindex; /* will be added later */};LIST_HEAD(mip6_mipif_list, mip6_mipif);/* Parsing MH options */struct mip6_mobility_options { struct ip6_mh_opt_refresh_advice *opt_refresh; struct ip6_mh_opt_altcoa *opt_altcoa; struct ip6_mh_opt_nonce_index *opt_nonce; struct ip6_mh_opt_auth_data *opt_auth;#ifdef MIP_MCOA struct ip6_mh_opt_bid *opt_bid;#endif /* MIP_MCOA */};/* Binding Cache */struct binding_cache { LIST_ENTRY(binding_cache) bc_entry; struct in6_addr bc_hoa; /* peer home address */ struct in6_addr bc_coa; /* peer coa */ struct in6_addr bc_myaddr; /* my addr (needed?) */ u_int8_t bc_status; /* BA statue */ u_int16_t bc_flags; /* recved BU flags */ u_int16_t bc_seqno; /* recved BU seqno */ u_int32_t bc_lifetime; /* recved BU lifetime */ time_t bc_expire; /* expiration time of this BC. */ CALLOUT_HANDLE bc_refresh; /* callout handle for retrans */ u_int8_t bc_refresh_count; /* valid only when BUF_HOME */ void *bc_dad; /* dad handler */ time_t bc_mpa_exp; /* expiration time for MPA */ struct binding_cache *bc_llmbc; u_int32_t bc_refcnt; u_int bc_brr_sent;#ifdef MIP_MCOA u_int16_t bc_bid; /* Binding Unique Identifier */#endif /* MIP_MCOA */};LIST_HEAD(binding_cache_head, binding_cache);/*extern int debug, numerichost;Tong: already defined in netinet6/in6_var.h const char *ip6_sprintf(const struct in6_addr *addr);*//* mh.c */STATUS mhsock_open(void);void mhsock_close(void);int mh_input_common(int);int get_mobility_options(struct ip6_mh *, int, int, struct mip6_mobility_options *);int mip6_icmp6_create_haanyaddr(struct in6_addr *, struct in6_addr *, int);int in6_mask2len(struct in6_addr *, u_char *);struct home_agent_list *mip6_find_hal(struct mip6_hoainfo *);int mh_input(struct in6_addr *, struct in6_addr *, struct in6_addr *, struct in6_addr *, struct ip6_mh *, int);#ifdef MIP_MCOAint get_bid_option(struct ip6_mh *, int, int);#endif /* MIP_MCOA */int send_brr(struct in6_addr *, struct in6_addr *);int send_hoti(struct binding_update_list *);int send_coti(struct binding_update_list *);int send_bu(struct binding_update_list *);int send_be(struct in6_addr *, struct in6_addr *, struct in6_addr *, u_int8_t);int send_hot(struct ip6_mh_home_test_init *, struct in6_addr *, struct in6_addr *);int send_cot(struct ip6_mh_careof_test_init *, struct in6_addr *, struct in6_addr *);int send_ba(struct in6_addr *, struct in6_addr *, struct in6_addr *, struct in6_addr *, struct ip6_mh_binding_update *, mip6_kbm_t *, u_int8_t, u_int16_t, u_int16_t, int, u_int16_t);void mip6_calculate_kbm(mip6_token_t *, mip6_token_t *, mip6_kbm_t *);void mip6_calculate_authenticator(mip6_kbm_t *, struct in6_addr *, struct in6_addr *, caddr_t, size_t, int, size_t, mip6_authenticator_t *);struct mip6_nonces_info *get_nonces(u_int16_t);struct mip6_nonces_info * generate_nonces(struct mip6_nonces_info *);void init_nonces (void);void create_keygentoken(struct in6_addr *, struct mip6_nonces_info *, u_int8_t *, u_int8_t);/* binding.c */struct binding_update_list *bul_get(struct in6_addr *, struct in6_addr *);#ifndef MIP_MCOAstruct binding_update_list *bul_insert(struct mip6_hoainfo *, struct in6_addr *, struct in6_addr *, u_int16_t);#else /* MIP_MCOA */struct binding_update_list *bul_mcoa_get(struct in6_addr *, struct in6_addr *, u_int16_t);struct binding_update_list *bul_insert(struct mip6_hoainfo *, struct in6_addr *, struct in6_addr *, u_int16_t, u_int16_t);#endif /* MIP_MCOA */void bul_remove(struct binding_update_list *);struct binding_update_list *bul_get_nohoa(char *, struct in6_addr *, struct in6_addr *);struct binding_update_list *bul_get_homeflag(struct in6_addr *);struct mip6_hoainfo *hoainfo_find_withhoa(struct in6_addr *);struct mip6_hoainfo *hoainfo_insert(struct in6_addr *, u_int16_t); int hoainfo_remove(struct in6_addr *);struct mip6_hoainfo *hoainfo_get_withdhaadid (u_int16_t);void mip6_bc_init(void);void mip6_flush_kernel_bc(void);void mip6_bc_delete(struct binding_cache *);void mip6_bc_refresh_timer(void *);void mipscok_bc_request(struct binding_cache *, u_char);struct binding_cache *mip6_bc_lookup(struct in6_addr *, struct in6_addr *, u_int16_t);struct binding_cache *mip6_bc_add(struct in6_addr *, struct in6_addr *, struct in6_addr *, u_int32_t, u_int16_t, u_int16_t, u_int16_t);/* network.c */int set_ip6addr(char *, struct in6_addr *, int, int);int delete_ip6addr(char *, struct in6_addr *, int);/* common.c */int mipsock_input_common(int);STATUS mipsock_open(void);int mipsock_nodetype_request(u_int8_t, u_int8_t);int mipsock_behint_input(struct mip_msghdr *);STATUS icmp6sock_open(void);int icmp6_input_common(int);void mip6_create_addr(struct in6_addr *, const struct in6_addr *, struct in6_addr *, u_int8_t);struct mip6_hpfxl *mip6_get_hpfxlist(struct in6_addr *, int, struct mip6_hpfx_list *);struct home_agent_list *mip6_get_hal(struct mip6_hpfxl *, struct in6_addr *);void mip6_delete_hal(struct mip6_hpfxl *, struct in6_addr *);int mip6_are_prefix_equal(struct in6_addr *, struct in6_addr *, int);void mip6_flush_hal(struct mip6_hpfxl *, int);void mip6_delete_hpfxlist(struct in6_addr *, u_int16_t, struct mip6_hpfx_list *);void hal_set_expire_timer(struct home_agent_list *, int);void hal_stop_expire_timer(struct home_agent_list *);void hal_expire_timer(void *);/* mnd.c */int mipsock_bul_request(struct binding_update_list *, u_char);int mipsock_recv_mdinfo(struct mip_msghdr *);#ifndef MIP_MCOAint bul_update_by_mipsock_w_hoa(struct in6_addr *, struct in6_addr *);#elseint bul_update_by_mipsock_w_hoa(struct in6_addr *, struct in6_addr *, u_int16_t);#endif /* MIP_MCOA */int mipsock_md_update_bul_byifindex(u_int16_t, struct in6_addr *);int mipsock_md_dereg_bul(struct in6_addr *, struct in6_addr *, u_int16_t);int send_haadreq(struct mip6_hoainfo *, int, struct in6_addr *);struct home_agent_list *mnd_add_hal(struct mip6_hpfxl *, struct in6_addr *, int);struct mip6_hpfxl *mnd_add_hpfxlist(struct in6_addr *, u_int16_t, struct mip6_hpfx_mn_exclusive *, struct mip6_hpfx_list *);struct mip6_mipif *mnd_get_mipif(u_int16_t);int send_na_home(struct in6_addr *, u_int16_t);int set_default_bu_lifetime(struct mip6_hoainfo *);struct noro_host_list *noro_get(struct in6_addr *);void noro_add(struct in6_addr *);/* had.c */int mipsock_input(struct mip_msghdr *);struct home_agent_list *had_add_hal(struct mip6_hpfxl *, struct in6_addr *, struct in6_addr *, uint16_t, uint16_t, int);struct mip6_hpfxl *had_add_hpfxlist(struct in6_addr *, u_int16_t);int had_is_ha_if(u_int16_t);struct mip6_hpfxl *had_is_myhomenet(struct in6_addr *);int send_haadrep(struct in6_addr *, struct in6_addr *, struct mip6_dhaad_req *, u_short);int send_mpa(struct in6_addr *, u_int16_t, u_short);#ifdef __cplusplus}#endif#endif /* _SHISAD_H_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -