Lines Matching refs:hash_obj
71 add_hashobject_to_hashtable(hash_obj_t *hash_obj)
76 hash_obj->obj_hdl = ++handle_count; /* store the handle */
79 index_to_hash = ((hash_obj->obj_hdl) % TABLE_SIZE);
81 hash_obj->next = hash_table[index_to_hash];
82 hash_table[index_to_hash] = hash_obj; /* hash obj. added */
84 if (hash_obj->next != NULL) {
85 hash_obj->next->prev = hash_obj;
93 hash_obj_t *hash_obj;
101 hash_obj = malloc(sizeof (hash_obj_t));
102 if (hash_obj == NULL) {
109 hash_obj->object_type = CONTAINER_TYPE;
110 hash_obj->u.cont_obj = cont_obj;
111 hash_obj->next = NULL;
112 hash_obj->prev = NULL;
114 return (hash_obj);
121 hash_obj_t *hash_obj;
129 hash_obj = malloc(sizeof (hash_obj_t));
130 if (hash_obj == NULL) {
138 hash_obj->u.sec_obj = sec_obj;
139 hash_obj->object_type = SECTION_TYPE;
140 hash_obj->next = NULL;
141 hash_obj->prev = NULL;
143 return (hash_obj);
150 hash_obj_t *hash_obj;
158 hash_obj = malloc(sizeof (hash_obj_t));
159 if (hash_obj == NULL) {
167 hash_obj->object_type = SEGMENT_TYPE;
168 hash_obj->u.seg_obj = seg_obj;
169 hash_obj->next = NULL;
170 hash_obj->prev = NULL;
172 return (hash_obj);
179 hash_obj_t *hash_obj;
187 hash_obj = malloc(sizeof (hash_obj_t));
188 if (hash_obj == NULL) {
195 hash_obj->object_type = PACKET_TYPE;
196 hash_obj->u.pkt_obj = pkt_obj;
197 hash_obj->next = NULL;
198 hash_obj->prev = NULL;
200 return (hash_obj);
208 hash_obj_t *hash_obj;
214 hash_obj = lookup_handle_object(handle, CONTAINER_TYPE);
215 if (hash_obj == NULL) {
220 hash_obj = lookup_handle_object(handle, SECTION_TYPE);
221 if (hash_obj == NULL) {
224 hash_obj = lookup_handle_object(hash_obj->u.sec_obj->cont_hdl,
233 return (hash_obj);
261 free_pkt_object_list(hash_obj_t *hash_obj)
266 next_obj = hash_obj->u.seg_obj->pkt_obj_list;
289 hash_obj->u.seg_obj->pkt_obj_list = NULL;
1160 hash_obj_t *hash_obj;
1166 hash_obj = lookup_handle_object(container, CONTAINER_TYPE);
1167 if (hash_obj == NULL) {
1172 sec_hash_obj = hash_obj->u.cont_obj->sec_obj_list;
1207 if (hash_obj->prev == NULL) {
1208 hash_table[(hash_obj->obj_hdl % TABLE_SIZE)] =
1209 hash_obj->next;
1210 if (hash_obj->next != NULL) {
1211 hash_obj->next->prev = NULL;
1214 hash_obj->prev->next = hash_obj->next;
1215 if (hash_obj->next != NULL) {
1216 hash_obj->next->prev = hash_obj->prev;
1220 free(hash_obj->u.cont_obj);
1221 free(hash_obj);