Committer: Diego Biurrun <diego@xxxxxxxxxx> Date: 13/04/2010 at 18:52:18 Revision: 4263 Revision-id: diego@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Branch nick: trunk Log: hipd: Mark all functions only used within their files as static. Modified: M hipd/accessor.c M hipd/cert.c M hipd/cookie.c M hipd/dhtqueue.c M hipd/hadb.c M hipd/hipd.c M hipd/input.c M hipd/netdev.c M hipd/oppdb.c === modified file 'hipd/accessor.c' --- hipd/accessor.c 2010-04-13 11:17:51 +0000 +++ hipd/accessor.c 2010-04-13 15:52:03 +0000 @@ -80,7 +80,7 @@ * @param msg a message with message type as HIP_MSG_SET_OPPTCP_ON * or HIP_MSG_SET_OPPTCP_OFF */ -void hip_set_opportunistic_tcp_status(struct hip_common *msg) +static void hip_set_opportunistic_tcp_status(struct hip_common *msg) { struct sockaddr_in6 sock_addr; int retry, type, n; === modified file 'hipd/cert.c' --- hipd/cert.c 2010-04-13 11:10:38 +0000 +++ hipd/cert.c 2010-04-13 15:52:03 +0000 @@ -1049,7 +1049,7 @@ return err; } -int verify_callback(int ok, X509_STORE_CTX *stor) +static int verify_callback(int ok, X509_STORE_CTX *stor) { /* This is not called from anywhere else than this file */ if (!ok) { === modified file 'hipd/cookie.c' --- hipd/cookie.c 2010-04-13 11:33:54 +0000 +++ hipd/cookie.c 2010-04-13 15:52:03 +0000 @@ -137,8 +137,8 @@ * * @return 0 <= x < HIP_R1TABLESIZE */ -int hip_calc_cookie_idx(struct in6_addr *ip_i, struct in6_addr *ip_r, - struct in6_addr *hit_i) +static int hip_calc_cookie_idx(struct in6_addr *ip_i, struct in6_addr *ip_r, + struct in6_addr *hit_i) { register uint32_t base = 0; int i; === modified file 'hipd/dhtqueue.c' --- hipd/dhtqueue.c 2010-04-13 11:23:10 +0000 +++ hipd/dhtqueue.c 2010-04-13 15:52:03 +0000 @@ -57,7 +57,7 @@ * * @note only for internal use in this file */ -unsigned long hip_dht_queue_hash(const struct hip_queue *item) +static unsigned long hip_dht_queue_hash(const struct hip_queue *item) { uint8_t hash[HIP_AH_SHA_LEN]; hip_build_digest(HIP_DIGEST_SHA1, @@ -104,7 +104,7 @@ return 0; } -void hip_dht_queue_rec_free_doall(struct hip_queue *rec) +static void hip_dht_queue_rec_free_doall(struct hip_queue *rec) { struct hip_queue *deleted_rec; === modified file 'hipd/hadb.c' --- hipd/hadb.c 2010-04-13 11:10:38 +0000 +++ hipd/hadb.c 2010-04-13 15:52:03 +0000 @@ -168,7 +168,7 @@ * * @param entry the host association */ -void hip_hadb_set_lsi_pair(hip_ha_t *entry) +static void hip_hadb_set_lsi_pair(hip_ha_t *entry) { hip_lsi_t aux; //Assign value to lsi_our searching in hidb by the correspondent hit @@ -1543,7 +1543,7 @@ } } -void hip_hadb_rec_free_doall(hip_ha_t *rec) +static void hip_hadb_rec_free_doall(hip_ha_t *rec) { if (hadb_hit == NULL || rec == NULL) { return; === modified file 'hipd/hipd.c' --- hipd/hipd.c 2010-04-13 11:10:38 +0000 +++ hipd/hipd.c 2010-04-13 15:52:03 +0000 @@ -207,7 +207,7 @@ * @param *uadb_info structure containing data sent by the agent * @return 0 on success, -1 on failure */ -int add_cert_and_hits_to_db(struct hip_uadb_info *uadb_info) +static int add_cert_and_hits_to_db(struct hip_uadb_info *uadb_info) { int err = 0; char insert_into[512]; === modified file 'hipd/input.c' --- hipd/input.c 2010-04-13 11:33:54 +0000 +++ hipd/input.c 2010-04-13 15:52:03 +0000 @@ -1284,11 +1284,11 @@ } //TODO doxygen header missing -int handle_locator(struct hip_locator *locator, - in6_addr_t *r1_saddr, - in6_addr_t *r1_daddr, - hip_ha_t *entry, - hip_portpair_t *r1_info) +static int handle_locator(struct hip_locator *locator, + in6_addr_t *r1_saddr, + in6_addr_t *r1_daddr, + hip_ha_t *entry, + hip_portpair_t *r1_info) { int n_addrs = 0, loc_size = 0, err = 0; === modified file 'hipd/netdev.c' --- hipd/netdev.c 2010-04-13 10:36:12 +0000 +++ hipd/netdev.c 2010-04-13 15:52:03 +0000 @@ -132,7 +132,7 @@ * @param ptr a pointer to a netdev_address structure * @return the calculated hash to index the parameter */ -unsigned long hip_netdev_hash(const void *ptr) +static unsigned long hip_netdev_hash(const void *ptr) { const struct netdev_address *na = (const struct netdev_address *) ptr; uint8_t hash[HIP_AH_SHA_LEN]; @@ -902,12 +902,12 @@ * will be used as a last resort. * @todo move this function to some other file */ -int hip_netdev_trigger_bex(hip_hit_t *src_hit, - hip_hit_t *dst_hit, - hip_lsi_t *src_lsi, - hip_lsi_t *dst_lsi, - struct in6_addr *src_addr, - struct in6_addr *dst_addr) +static int hip_netdev_trigger_bex(hip_hit_t *src_hit, + hip_hit_t *dst_hit, + hip_lsi_t *src_lsi, + hip_lsi_t *dst_lsi, + struct in6_addr *src_addr, + struct in6_addr *dst_addr) { int err = 0, if_index = 0, is_ipv4_locator; int reuse_hadb_local_address = 0, ha_nat_mode = hip_nat_status; === modified file 'hipd/oppdb.c' --- hipd/oppdb.c 2010-04-13 11:25:00 +0000 +++ hipd/oppdb.c 2010-04-13 15:52:03 +0000 @@ -413,8 +413,8 @@ * which to calculate the pseudo HIT * @return a host assocition or NULL if not found */ -hip_ha_t *hip_oppdb_get_hadb_entry(hip_hit_t *init_hit, - struct in6_addr *resp_addr) +static hip_ha_t *hip_oppdb_get_hadb_entry(hip_hit_t *init_hit, + struct in6_addr *resp_addr) { hip_ha_t *entry_tmp = NULL; hip_hit_t phit;