------------------------------------------------------------ revno: 5361 committer: Diego Biurrun <diego@xxxxxxxxxx> branch nick: hipl timestamp: Tue 2011-01-04 15:10:46 +0100 message: Drop typedef and _t namespace suffix from struct hip_fw_context. The _t namespace is reserved for POSIX; typedefs are evil. modified: firewall/conntrack.c firewall/conntrack.h firewall/esp_prot_conntrack.c firewall/esp_prot_conntrack.h firewall/firewall.c firewall/firewall_defines.h firewall/midauth.c firewall/midauth.h firewall/pisa.c firewall/sysopp.c firewall/sysopp.h firewall/user_ipsec_api.c firewall/user_ipsec_api.h firewall/user_ipsec_esp.c firewall/user_ipsec_esp.h -- lp:hipl https://code.launchpad.net/~hipl-core/hipl/trunk Your team HIPL core team is subscribed to branch lp:hipl. To unsubscribe from this branch go to https://code.launchpad.net/~hipl-core/hipl/trunk/+edit-subscription
=== modified file 'firewall/conntrack.c' --- firewall/conntrack.c 2010-12-28 16:19:46 +0000 +++ firewall/conntrack.c 2011-01-04 14:10:46 +0000 @@ -798,7 +798,7 @@ * @return zero on success and non-zero on error */ static int hipfw_handle_relay_to_r2(const struct hip_common *common, - const hip_fw_context_t *ctx) + const struct hip_fw_context *ctx) { struct iphdr *iph = (struct iphdr *) ctx->ipq_packet->payload; const struct hip_relay_to *relay_to = NULL; /* same format as relay_from */ @@ -884,7 +884,7 @@ // first check signature then store hi static int handle_r1(struct hip_common *common, struct tuple *tuple, DBG int verify_responder, - UNUSED const hip_fw_context_t *ctx) + UNUSED const struct hip_fw_context *ctx) { struct in6_addr hit; const struct hip_host_id *host_id = NULL; @@ -954,7 +954,7 @@ * @return one on success or zero failure */ static int handle_i2(struct hip_common *common, struct tuple *tuple, - const hip_fw_context_t *ctx) + const struct hip_fw_context *ctx) { const struct hip_esp_info *spi = NULL; const struct slist *other_dir_esps = NULL; @@ -1062,7 +1062,7 @@ * @return one if packet was processed successfully or zero otherwise */ static int handle_r2(const struct hip_common *common, struct tuple *tuple, - const hip_fw_context_t *ctx) + const struct hip_fw_context *ctx) { const struct hip_esp_info *spi = NULL; struct tuple *other_dir = NULL; @@ -1254,7 +1254,7 @@ */ static int handle_update(const struct hip_common *common, struct tuple *tuple, - const hip_fw_context_t *ctx) + const struct hip_fw_context *ctx) { const struct hip_seq *seq = NULL; const struct hip_esp_info *esp_info = NULL; @@ -1438,7 +1438,7 @@ UNUSED const struct in6_addr *ip6_dst, UNUSED const struct hip_common *common, struct tuple *tuple, - UNUSED const hip_fw_context_t *ctx) + UNUSED const struct hip_fw_context *ctx) { int err = 1; @@ -1476,7 +1476,7 @@ UNUSED const struct in6_addr *ip6_dst, UNUSED const struct hip_common *common, struct tuple *tuple, - UNUSED const hip_fw_context_t *ctx) + UNUSED const struct hip_fw_context *ctx) { int err = 1; @@ -1520,7 +1520,7 @@ struct tuple *tuple, const int verify_responder, const int accept_mobile, - hip_fw_context_t *ctx) + struct hip_fw_context *ctx) { #ifdef CONFIG_HIP_OPPORTUNISTIC hip_hit_t phit; @@ -1682,7 +1682,7 @@ * ESP filtering. 1 means that the packet was not related to relayin * and should just proceed to ESP filtering. */ -int hipfw_relay_esp(const hip_fw_context_t *ctx) +int hipfw_relay_esp(const struct hip_fw_context *ctx) { struct iphdr *iph = (struct iphdr *) ctx->ipq_packet->payload; struct udphdr *udph = (struct udphdr *) ((uint8_t *) iph + iph->ihl * 4); @@ -1757,7 +1757,7 @@ * @param ctx context for the packet * @return verdict for the packet (zero means drop, one means pass) */ -int filter_esp_state(const hip_fw_context_t *ctx) +int filter_esp_state(const struct hip_fw_context *ctx) { const struct in6_addr *dst_addr = NULL; const struct in6_addr *src_addr = NULL; @@ -1837,7 +1837,7 @@ */ int filter_state(const struct in6_addr *ip6_src, const struct in6_addr *ip6_dst, struct hip_common *buf, const struct state_option *option, - const int must_accept, hip_fw_context_t *ctx) + const int must_accept, struct hip_fw_context *ctx) { struct hip_data *data = NULL; struct tuple *tuple = NULL; @@ -1911,7 +1911,7 @@ int conntrack(const struct in6_addr *ip6_src, const struct in6_addr *ip6_dst, struct hip_common *buf, - hip_fw_context_t *ctx) + struct hip_fw_context *ctx) { struct hip_data *data = NULL; struct tuple *tuple = NULL; === modified file 'firewall/conntrack.h' --- firewall/conntrack.h 2010-12-13 19:09:27 +0000 +++ firewall/conntrack.h 2011-01-04 14:10:46 +0000 @@ -43,20 +43,20 @@ REPLY_DIR, }; -int filter_esp_state(const hip_fw_context_t *ctx); +int filter_esp_state(const struct hip_fw_context *ctx); int filter_state(const struct in6_addr *ip6_src, const struct in6_addr *ip6_dst, struct hip_common *buf, const struct state_option *option, - const int accept, hip_fw_context_t *ctx); + const int accept, struct hip_fw_context *ctx); int conntrack(const struct in6_addr *ip6_src, const struct in6_addr *ip6_dst, - struct hip_common *buf, hip_fw_context_t *ctx); + struct hip_common *buf, struct hip_fw_context *ctx); struct esp_tuple *find_esp_tuple(const struct slist *esp_list, const uint32_t spi); struct tuple *get_tuple_by_hits(const struct in6_addr *src_hit, const struct in6_addr *dst_hit); -int hipfw_relay_esp(const hip_fw_context_t *ctx); +int hipfw_relay_esp(const struct hip_fw_context *ctx); #endif /* HIP_FIREWALL_CONNTRACK_H */ === modified file 'firewall/esp_prot_conntrack.c' --- firewall/esp_prot_conntrack.c 2011-01-03 19:36:44 +0000 +++ firewall/esp_prot_conntrack.c 2011-01-04 14:10:46 +0000 @@ -975,7 +975,7 @@ */ int esp_prot_conntrack_lupdate(const struct hip_common *common, struct tuple *tuple, - const hip_fw_context_t *ctx) + const struct hip_fw_context *ctx) { const struct hip_seq *seq = NULL; const struct hip_tlv_common *param = NULL; @@ -1086,7 +1086,7 @@ * @param esp_tuple corresponding esp state of the connection * @return 0 on success, -1 on error */ -int esp_prot_conntrack_verify(const hip_fw_context_t *ctx, +int esp_prot_conntrack_verify(const struct hip_fw_context *ctx, struct esp_tuple *esp_tuple) { esp_prot_conntrack_tfm_t *conntrack_tfm = NULL; === modified file 'firewall/esp_prot_conntrack.h' --- firewall/esp_prot_conntrack.h 2011-01-03 19:36:44 +0000 +++ firewall/esp_prot_conntrack.h 2011-01-04 14:10:46 +0000 @@ -56,8 +56,8 @@ int esp_prot_conntrack_remove_state(struct esp_tuple *esp_tuple); int esp_prot_conntrack_lupdate(const struct hip_common *common, struct tuple *tuple, - const hip_fw_context_t *ctx); -int esp_prot_conntrack_verify(const hip_fw_context_t *ctx, + const struct hip_fw_context *ctx); +int esp_prot_conntrack_verify(const struct hip_fw_context *ctx, struct esp_tuple *esp_tuple); #endif /* HIP_FIREWALL_ESP_PROT_CONNTRACK_H */ === modified file 'firewall/firewall.c' --- firewall/firewall.c 2010-12-27 14:44:02 +0000 +++ firewall/firewall.c 2011-01-04 14:10:46 +0000 @@ -128,7 +128,7 @@ static hip_lsi_t default_lsi; /* definition of the function pointer (see below) */ -typedef int (*hip_fw_handler_t)(hip_fw_context_t *); +typedef int (*hip_fw_handler_t)(struct hip_fw_context *); /* The firewall handlers do not accept rules directly. They should return * zero when they transformed packet and the original should be dropped. * Non-zero means that there was an error or the packet handler did not @@ -851,7 +851,7 @@ * @param ctx packet context * @return the verdict (1 for pass and 0 for drop) */ -static int filter_esp(const hip_fw_context_t *ctx) +static int filter_esp(const struct hip_fw_context *ctx) { /* drop packet by default */ int verdict = 0, ret; @@ -900,7 +900,7 @@ const unsigned int hook, const char *in_if, const char *out_if, - hip_fw_context_t *ctx) + struct hip_fw_context *ctx) { // complete rule list for hook (== IN / OUT / FORWARD) struct dlist *list = read_rules(hook); @@ -1143,7 +1143,7 @@ * * @return the verdict (1 for pass and 0 for drop) */ -static int hip_fw_handle_hip_output(hip_fw_context_t *ctx){ +static int hip_fw_handle_hip_output(struct hip_fw_context *ctx){ int verdict = accept_hip_esp_traffic_by_default; HIP_DEBUG("hip_fw_handle_hip_output \n"); @@ -1171,7 +1171,7 @@ * * @return the verdict (1 for pass and 0 for drop) */ -static int hip_fw_handle_esp_output(hip_fw_context_t *ctx) +static int hip_fw_handle_esp_output(struct hip_fw_context *ctx) { int verdict = accept_hip_esp_traffic_by_default; @@ -1193,7 +1193,7 @@ * * @return the verdict (1 for pass and 0 for drop) */ -static int hip_fw_handle_other_output(hip_fw_context_t *ctx) +static int hip_fw_handle_other_output(struct hip_fw_context *ctx) { int verdict = accept_normal_traffic_by_default; @@ -1248,7 +1248,7 @@ * * @return the verdict (1 for pass and 0 for drop) */ -static int hip_fw_handle_tcp_output(hip_fw_context_t *ctx) +static int hip_fw_handle_tcp_output(struct hip_fw_context *ctx) { HIP_DEBUG("\n"); @@ -1262,7 +1262,7 @@ * * @return the verdict (1 for pass and 0 for drop) */ -static int hip_fw_handle_hip_forward(hip_fw_context_t *ctx) +static int hip_fw_handle_hip_forward(struct hip_fw_context *ctx) { HIP_DEBUG("\n"); @@ -1284,7 +1284,7 @@ * * @return the verdict (1 for pass and 0 for drop) */ -static int hip_fw_handle_esp_forward(hip_fw_context_t *ctx) +static int hip_fw_handle_esp_forward(struct hip_fw_context *ctx) { int verdict = accept_hip_esp_traffic_by_default; @@ -1306,7 +1306,7 @@ * * @return the verdict (1 for pass and 0 for drop) */ -static int hip_fw_handle_tcp_forward(UNUSED hip_fw_context_t *ctx) +static int hip_fw_handle_tcp_forward(UNUSED struct hip_fw_context *ctx) { HIP_DEBUG("\n"); @@ -1321,7 +1321,7 @@ * * @return the verdict (1 for pass and 0 for drop) */ -static int hip_fw_handle_other_input(hip_fw_context_t *ctx) +static int hip_fw_handle_other_input(struct hip_fw_context *ctx) { int verdict = accept_normal_traffic_by_default; int ip_hits = ipv6_addr_is_hit(&ctx->src) && @@ -1350,7 +1350,7 @@ * * @return the verdict (1 for pass and 0 for drop) */ -static int hip_fw_handle_hip_input(hip_fw_context_t *ctx) +static int hip_fw_handle_hip_input(struct hip_fw_context *ctx) { int verdict = accept_hip_esp_traffic_by_default; @@ -1368,7 +1368,7 @@ * * @return the verdict (1 for pass and 0 for drop) */ -static int hip_fw_handle_esp_input(hip_fw_context_t *ctx) +static int hip_fw_handle_esp_input(struct hip_fw_context *ctx) { int verdict = accept_hip_esp_traffic_by_default; @@ -1397,7 +1397,7 @@ * * @return the verdict (1 for pass and 0 for drop) */ -static int hip_fw_handle_tcp_input(hip_fw_context_t *ctx) +static int hip_fw_handle_tcp_input(struct hip_fw_context *ctx) { int verdict = accept_normal_traffic_by_default; @@ -1495,7 +1495,7 @@ * @param ip_version the IP version for this packet * @return One if @c hdr is a HIP packet, zero otherwise. */ -static int hip_fw_init_context(hip_fw_context_t *ctx, +static int hip_fw_init_context(struct hip_fw_context *ctx, const unsigned char *buf, const int ip_version) { @@ -1509,7 +1509,7 @@ ctx->packet_type = OTHER_PACKET; // same context memory as for packets before -> re-init - memset(ctx, 0, sizeof(hip_fw_context_t)); + memset(ctx, 0, sizeof(struct hip_fw_context)); // add whole packet to context and ip version ctx->ipq_packet = ipq_get_packet(buf); @@ -1816,7 +1816,7 @@ static int hip_fw_handle_packet(unsigned char *buf, struct ipq_handle *hndl, const int ip_version, - hip_fw_context_t *ctx) + struct hip_fw_context *ctx) { // assume DROP int verdict = 0; @@ -1947,7 +1947,7 @@ fd_set read_fdset; struct timeval timeout; unsigned char buf[HIP_MAX_PACKET]; - hip_fw_context_t ctx; + struct hip_fw_context ctx; int limit_capabilities = 0; int is_root = 0, access_ok = 0, msg_type = 0; //variables for accepting user messages only from hipd === modified file 'firewall/firewall_defines.h' --- firewall/firewall_defines.h 2011-01-03 16:19:22 +0000 +++ firewall/firewall_defines.h 2011-01-04 14:10:46 +0000 @@ -43,7 +43,7 @@ #include "esp_prot_defines.h" -typedef struct hip_fw_context { +struct hip_fw_context { // queued packet ipq_packet_msg_t *ipq_packet; @@ -66,7 +66,7 @@ struct udphdr *udp_encap_hdr; int modified; -} hip_fw_context_t; +}; /********** State table structures **************/ === modified file 'firewall/midauth.c' --- firewall/midauth.c 2010-10-15 15:29:14 +0000 +++ firewall/midauth.c 2011-01-04 14:10:46 +0000 @@ -208,7 +208,7 @@ * * @param ctx context of the modified midauth packet */ -static void midauth_update_all_headers(hip_fw_context_t *ctx) +static void midauth_update_all_headers(struct hip_fw_context *ctx) { struct iphdr *ipv4 = NULL; struct ip6_hdr *ipv6 = NULL; @@ -331,7 +331,7 @@ * @param opaque_len length of the opaque data field * @return 0 on success, <0 otherwise */ -int midauth_add_challenge_request(hip_fw_context_t *ctx, uint8_t val_K, +int midauth_add_challenge_request(struct hip_fw_context *ctx, uint8_t val_K, uint8_t ltime, uint8_t *opaque, uint8_t opaque_len) @@ -351,7 +351,7 @@ return err; } -int midauth_handler_accept(UNUSED hip_fw_context_t *ctx) +int midauth_handler_accept(UNUSED struct hip_fw_context *ctx) { return NF_ACCEPT; } @@ -362,7 +362,7 @@ * @param ctx context of the packet * @return NF_DROP */ -static int midauth_handler_drop(UNUSED hip_fw_context_t *ctx) +static int midauth_handler_drop(UNUSED struct hip_fw_context *ctx) { return NF_DROP; } @@ -373,7 +373,7 @@ * @param ctx context of the modified packet * @return the verdict, either NF_ACCEPT or NF_DROP */ -static midauth_handler filter_midauth_update(const hip_fw_context_t *ctx) +static midauth_handler filter_midauth_update(const struct hip_fw_context *ctx) { if (hip_get_param(ctx->transport_hdr.hip, HIP_PARAM_LOCATOR)) { return handlers.u1; @@ -396,7 +396,7 @@ * @param ctx HIP connection context * @return the verdict, either NF_ACCEPT or NF_DROP */ -int midauth_filter_hip(hip_fw_context_t *ctx) +int midauth_filter_hip(struct hip_fw_context *ctx) { int verdict = NF_ACCEPT; midauth_handler h = NULL; === modified file 'firewall/midauth.h' --- firewall/midauth.h 2010-10-15 15:29:14 +0000 +++ firewall/midauth.h 2011-01-04 14:10:46 +0000 @@ -38,7 +38,7 @@ #include "lib/core/protodefs.h" #include "firewall_defines.h" -typedef int (*midauth_handler)(hip_fw_context_t *ctx); +typedef int (*midauth_handler)(struct hip_fw_context *ctx); struct midauth_handlers { midauth_handler i1; @@ -58,7 +58,7 @@ * @param ctx context of the packet * @return NF_ACCEPT */ -int midauth_handler_accept(hip_fw_context_t *ctx); +int midauth_handler_accept(struct hip_fw_context *ctx); /** * Check the correctness of a hip_solution_m @@ -82,7 +82,7 @@ * @param opaque_len length of opaque * @return 0 on success */ -int midauth_add_challenge_request(hip_fw_context_t *ctx, +int midauth_add_challenge_request(struct hip_fw_context *ctx, uint8_t val_K, uint8_t ltime, uint8_t *opaque, uint8_t opaque_len); @@ -91,6 +91,6 @@ */ void midauth_init(void); -int midauth_filter_hip(hip_fw_context_t *ctx); +int midauth_filter_hip(struct hip_fw_context *ctx); #endif /* HIP_FIREWALL_MIDAUTH_H */ === modified file 'firewall/pisa.c' --- firewall/pisa.c 2010-12-13 21:24:26 +0000 +++ firewall/pisa.c 2011-01-04 14:10:46 +0000 @@ -183,7 +183,7 @@ * @param ctx context of the packet where the puzzle will be inserted * @return success (0) or failure */ -static int pisa_insert_puzzle(hip_fw_context_t *ctx) +static int pisa_insert_puzzle(struct hip_fw_context *ctx) { uint8_t opaque[PISA_PUZZLE_OPAQUE_LEN]; @@ -206,7 +206,7 @@ * @return pointer to the puzzle we accepted or NULL at failure */ static struct hip_challenge_response *pisa_check_challenge_response( - hip_fw_context_t *ctx) + struct hip_fw_context *ctx) { struct hip_challenge_response *response; struct hip_common *hip = ctx->transport_hdr.hip; @@ -247,7 +247,7 @@ * @param ctx context of the packet with the certificate to check * @return success (0) or failure */ -static int pisa_check_certificate(hip_fw_context_t *ctx) +static int pisa_check_certificate(struct hip_fw_context *ctx) { struct hip_common *hip = ctx->transport_hdr.hip; const struct hip_cert *cert; @@ -305,7 +305,7 @@ * * @param ctx context of the packet that belongs to that connection */ -static void pisa_accept_connection(const hip_fw_context_t *ctx) +static void pisa_accept_connection(const struct hip_fw_context *ctx) { struct hip_common *hip = ctx->transport_hdr.hip; struct tuple *t = get_tuple_by_hits(&hip->hits, &hip->hitr); @@ -324,7 +324,7 @@ * * @param ctx context of the packet that contains HITs of the connection */ -static void pisa_remove_connection(const hip_fw_context_t *ctx) +static void pisa_remove_connection(const struct hip_fw_context *ctx) { struct hip_common *hip = ctx->transport_hdr.hip; struct tuple *t = get_tuple_by_hits(&hip->hits, &hip->hitr); @@ -340,7 +340,7 @@ * * @param ctx context of the packet that belongs to that connection */ -static void pisa_reject_connection(const hip_fw_context_t *ctx) +static void pisa_reject_connection(const struct hip_fw_context *ctx) { HIP_INFO("PISA rejected the connection.\n"); pisa_remove_connection(ctx); @@ -352,7 +352,7 @@ * @param ctx context of the packet containing the I1 * @return NF_ACCEPT verdict */ -static int pisa_handler_i1(UNUSED hip_fw_context_t *ctx) +static int pisa_handler_i1(UNUSED struct hip_fw_context *ctx) { #ifdef CONFIG_HIP_PERFORMANCE HIP_DEBUG("Start PERF_BASE, PERF_I1\n"); @@ -375,7 +375,7 @@ * @param ctx context of the packet containing the R1 * @return NF_ACCEPT verdict */ -static int pisa_handler_r1(UNUSED hip_fw_context_t *ctx) +static int pisa_handler_r1(UNUSED struct hip_fw_context *ctx) { #ifdef CONFIG_HIP_PERFORMANCE HIP_DEBUG("Start PERF_R1\n"); @@ -397,7 +397,7 @@ * @param ctx context of the packet to modify * @return NF_ACCEPT verdict */ -static int pisa_handler_i2(hip_fw_context_t *ctx) +static int pisa_handler_i2(struct hip_fw_context *ctx) { #ifdef CONFIG_HIP_PERFORMANCE HIP_DEBUG("Start PERF_I2\n"); @@ -421,7 +421,7 @@ * @param ctx context of the packet to check * @return verdict, either NF_ACCEPT or NF_DROP */ -static int pisa_handler_r2(hip_fw_context_t *ctx) +static int pisa_handler_r2(struct hip_fw_context *ctx) { int verdict = NF_DROP, sig = 0, cert = 0; struct hip_challenge_response *solution = NULL; @@ -462,7 +462,7 @@ * @param ctx context of the packet to modify * @return NF_ACCEPT verdict */ -static int pisa_handler_u1(hip_fw_context_t *ctx) +static int pisa_handler_u1(struct hip_fw_context *ctx) { pisa_insert_puzzle(ctx); @@ -476,7 +476,7 @@ * @param ctx context of the packet to check * @return verdict, either NF_ACCEPT or NF_DROP */ -static int pisa_handler_u2(hip_fw_context_t *ctx) +static int pisa_handler_u2(struct hip_fw_context *ctx) { int verdict = NF_DROP; int sig = 0; @@ -506,7 +506,7 @@ * @param ctx context of the packet to check * @return verdict, either NF_ACCEPT or NF_DROP */ -static int pisa_handler_u3(hip_fw_context_t *ctx) +static int pisa_handler_u3(struct hip_fw_context *ctx) { int verdict = NF_DROP; int sig = 0; @@ -534,7 +534,7 @@ * @param ctx context of the packet * @return verdict, either NF_ACCEPT or NF_DROP */ -static int pisa_handler_close_ack(hip_fw_context_t *ctx) +static int pisa_handler_close_ack(struct hip_fw_context *ctx) { pisa_remove_connection(ctx); return NF_ACCEPT; === modified file 'firewall/sysopp.c' --- firewall/sysopp.c 2011-01-04 13:57:31 +0000 +++ firewall/sysopp.c 2011-01-04 14:10:46 +0000 @@ -114,7 +114,7 @@ * @param ctx the packet context * @param verdict the verdict to assign for the packet */ -static void hip_fw_add_non_hip_peer(const hip_fw_context_t *ctx, +static void hip_fw_add_non_hip_peer(const struct hip_fw_context *ctx, const int verdict) { char command[64]; @@ -156,7 +156,7 @@ * @param default_verdict default verdict for the packet * @return the verdict for the packet */ -int hip_fw_handle_outgoing_system_based_opp(const hip_fw_context_t *ctx, +int hip_fw_handle_outgoing_system_based_opp(const struct hip_fw_context *ctx, const int default_verdict) { struct hip_hadb_user_info_state *entry_peer = NULL; === modified file 'firewall/sysopp.h' --- firewall/sysopp.h 2010-10-15 15:29:14 +0000 +++ firewall/sysopp.h 2011-01-04 14:10:46 +0000 @@ -31,7 +31,7 @@ #include "lib/core/protodefs.h" #include "firewall_defines.h" -int hip_fw_handle_outgoing_system_based_opp(const hip_fw_context_t *ctx, +int hip_fw_handle_outgoing_system_based_opp(const struct hip_fw_context *ctx, const int default_verdict); int hip_fw_sys_opp_set_peer_hit(const struct hip_common *msg); void hip_fw_flush_system_based_opp_chains(void); === modified file 'firewall/user_ipsec_api.c' --- firewall/user_ipsec_api.c 2010-11-30 14:50:30 +0000 +++ firewall/user_ipsec_api.c 2011-01-04 14:10:46 +0000 @@ -213,7 +213,7 @@ * @param ctx the firewall context of the packet to be processed * @return 0, if correct, else != 0 */ -int hip_fw_userspace_ipsec_output(const hip_fw_context_t *ctx) +int hip_fw_userspace_ipsec_output(const struct hip_fw_context *ctx) { // entry matching the peer HIT hip_sa_entry_t *entry = NULL; @@ -342,7 +342,7 @@ * @param ctx the firewall context of the packet to be processed * @return 0, if correct, else != 0 */ -int hip_fw_userspace_ipsec_input(const hip_fw_context_t *ctx) +int hip_fw_userspace_ipsec_input(const struct hip_fw_context *ctx) { struct hip_esp *esp_hdr = NULL; struct sockaddr_storage local_sockaddr; === modified file 'firewall/user_ipsec_api.h' --- firewall/user_ipsec_api.h 2010-10-15 15:29:14 +0000 +++ firewall/user_ipsec_api.h 2011-01-04 14:10:46 +0000 @@ -59,7 +59,7 @@ int userspace_ipsec_init(void); int userspace_ipsec_uninit(void); -int hip_fw_userspace_ipsec_input(const hip_fw_context_t *ctx); -int hip_fw_userspace_ipsec_output(const hip_fw_context_t *ctx); +int hip_fw_userspace_ipsec_input(const struct hip_fw_context *ctx); +int hip_fw_userspace_ipsec_output(const struct hip_fw_context *ctx); #endif /* HIP_FIREWALL_USER_IPSEC_API_H */ === modified file 'firewall/user_ipsec_esp.c' --- firewall/user_ipsec_esp.c 2010-10-15 15:29:14 +0000 +++ firewall/user_ipsec_esp.c 2011-01-04 14:10:46 +0000 @@ -546,7 +546,7 @@ * @param esp_packet_len packet length * @return 0, if correct, else != 0 */ -int hip_beet_mode_output(const hip_fw_context_t *ctx, hip_sa_entry_t *entry, +int hip_beet_mode_output(const struct hip_fw_context *ctx, hip_sa_entry_t *entry, const struct in6_addr *preferred_local_addr, const struct in6_addr *preferred_peer_addr, unsigned char *esp_packet, uint16_t *esp_packet_len) @@ -738,7 +738,7 @@ * @param decrypted_packet_len packet length of decrypted packet * @return 0, if correct, != 0 else */ -int hip_beet_mode_input(const hip_fw_context_t *ctx, hip_sa_entry_t *entry, +int hip_beet_mode_input(const struct hip_fw_context *ctx, hip_sa_entry_t *entry, unsigned char *decrypted_packet, uint16_t *decrypted_packet_len) { === modified file 'firewall/user_ipsec_esp.h' --- firewall/user_ipsec_esp.h 2010-10-15 15:29:14 +0000 +++ firewall/user_ipsec_esp.h 2011-01-04 14:10:46 +0000 @@ -43,13 +43,13 @@ #include "user_ipsec_sadb.h" -int hip_beet_mode_output(const hip_fw_context_t *ctx, +int hip_beet_mode_output(const struct hip_fw_context *ctx, hip_sa_entry_t *entry, const struct in6_addr *preferred_local_addr, const struct in6_addr *preferred_peer_addr, unsigned char *esp_packet, uint16_t *esp_packet_len); -int hip_beet_mode_input(const hip_fw_context_t *ctx, hip_sa_entry_t *entry, +int hip_beet_mode_input(const struct hip_fw_context *ctx, hip_sa_entry_t *entry, unsigned char *decrypted_packet, uint16_t *decrypted_packet_len);