Lines Matching full:sa

136 	struct subaction *sa;  in subaction_create()  local
139 sa = malloc(sizeof *sa - sizeof sa->packet + length); in subaction_create()
140 if (!sa) in subaction_create()
142 sa->ack = data[length / 4 - 1]; in subaction_create()
143 sa->length = length; in subaction_create()
144 memcpy(&sa->packet, data, length); in subaction_create()
146 return sa; in subaction_create()
150 subaction_destroy(struct subaction *sa) in subaction_destroy() argument
152 free(sa); in subaction_destroy()
188 struct subaction *sa; in link_transaction_destroy() local
191 sa = list_head(&t->request_list, struct subaction, link); in link_transaction_destroy()
192 list_remove(&sa->link); in link_transaction_destroy()
193 subaction_destroy(sa); in link_transaction_destroy()
196 sa = list_head(&t->response_list, struct subaction, link); in link_transaction_destroy()
197 list_remove(&sa->link); in link_transaction_destroy()
198 subaction_destroy(sa); in link_transaction_destroy()
215 struct subaction *sa; in handle_transaction() local
239 list_for_each_entry(sa, &t->request_list, link) in handle_transaction()
240 print_packet((uint32_t *) &sa->packet, sa->length); in handle_transaction()
241 list_for_each_entry(sa, &t->response_list, link) in handle_transaction()
242 print_packet((uint32_t *) &sa->packet, sa->length); in handle_transaction()
485 struct subaction *sa, *prev; in handle_request_packet() local
490 sa = subaction_create(data, length); in handle_request_packet()
491 t->request = sa; in handle_request_packet()
506 if (prev->packet.common.tcode != sa->packet.common.tcode || in handle_request_packet()
507 prev->packet.common.tlabel != sa->packet.common.tlabel) { in handle_request_packet()
513 list_append(&t->request_list, &sa->link); in handle_request_packet()
515 switch (sa->ack) { in handle_request_packet()
550 struct subaction *sa, *prev; in handle_response_packet() local
559 sa = subaction_create(data, length); in handle_response_packet()
560 t->response = sa; in handle_response_packet()
572 if (prev->packet.common.tcode != sa->packet.common.tcode || in handle_response_packet()
573 prev->packet.common.tlabel != sa->packet.common.tlabel) { in handle_response_packet()
587 sa->packet.common.tcode) { in handle_response_packet()
592 list_append(&t->response_list, &sa->link); in handle_response_packet()
594 switch (sa->ack) { in handle_response_packet()