Changeset 1260:4f6f61e67599 in freeDiameter for extensions/rt_redirect/rt_redir.h
- Timestamp:
- Mar 24, 2014, 9:21:41 PM (10 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/rt_redirect/rt_redir.h
r1259 r1260 1 1 /********************************************************************************************************* 2 2 * Software License Agreement (BSD License) * 3 * Author: Sebastien Decugis <sdecugis@freediameter.net> * 4 * * 5 * Copyright (c) 2013, WIDE Project and NICT * 3 * Author: Sebastien Decugis <sdecugis@freediameter.net> and * 4 * Thomas Klausner <tk@giga.or.at> * 5 * * 6 * Copyright (c) 2013, 2014, WIDE Project and NICT * 6 7 * All rights reserved. * 7 8 * * … … 36 37 /* Diameter Redirect management */ 37 38 #include <freeDiameter/extension.h> 39 40 #include "uthash.h" 38 41 39 42 /* There are 2 locks in this module. The priority is established as follow to avoid deadlocks: … … 130 133 struct fd_list target_peers_list; /* The list of Redirect-Hosts for this entry */ 131 134 132 struct timespec timeout; /* When does this entry expire s? */135 struct timespec timeout; /* When does this entry expire? */ 133 136 struct fd_list exp_list; /* chain in the expire_list list, ordered by expiration date, protected by exp_peer_lock */ 134 137 135 enum redir_h_u type; /* Type of this entry */138 enum redir_h_u type; /* Type of this entry */ 136 139 struct fd_list redir_list; /* link in redirects_usages lists. Lists are ordered by the data value. Protected by rw locks */ 137 union matchdata data; /* The strings are duplicated & must be freed in this structure */ 140 union matchdata data; /* The strings are duplicated & must be freed in this structure */ 141 UT_hash_handle hh; /* magic entry for hash table */ 138 142 }; 139 143 … … 145 149 }; 146 150 extern struct redir_line redirects_usages[]; 151 /* the hash table where entries are stored for ALL_SESSION and ALL_USER */ 152 extern struct redir_entry *redirect_hash_table[]; 147 153 148 154 /* Accelerator to the line lock */ … … 158 164 /* Functions on redir_entry */ 159 165 int redir_entry_init(); 166 int redir_entry_fini(); 160 167 int redir_entry_new(struct redir_entry ** e, struct fd_list * targets, uint32_t rhu, struct msg * qry, DiamId_t nh, size_t nhlen, os0_t oh, size_t ohlen); 161 168 extern int (*redir_entry_cmp_key[])(union matchdata * , union matchdata *); /* compare functions */
Note: See TracChangeset
for help on using the changeset viewer.