Lines Matching refs:sa
149 struct subaction *sa; in subaction_create() local
152 sa = malloc(sizeof *sa - sizeof sa->packet + length); in subaction_create()
153 if (!sa) in subaction_create()
155 sa->ack = data[length / 4 - 1]; in subaction_create()
156 sa->length = length; in subaction_create()
157 memcpy(&sa->packet, data, length); in subaction_create()
159 return sa; in subaction_create()
163 subaction_destroy(struct subaction *sa) in subaction_destroy() argument
165 free(sa); in subaction_destroy()
201 struct subaction *sa; in link_transaction_destroy() local
204 sa = list_head(&t->request_list, struct subaction, link); in link_transaction_destroy()
205 list_remove(&sa->link); in link_transaction_destroy()
206 subaction_destroy(sa); in link_transaction_destroy()
209 sa = list_head(&t->response_list, struct subaction, link); in link_transaction_destroy()
210 list_remove(&sa->link); in link_transaction_destroy()
211 subaction_destroy(sa); in link_transaction_destroy()
228 struct subaction *sa; in handle_transaction() local
252 list_for_each_entry(sa, &t->request_list, link) in handle_transaction()
253 print_packet((uint32_t *) &sa->packet, sa->length); in handle_transaction()
254 list_for_each_entry(sa, &t->response_list, link) in handle_transaction()
255 print_packet((uint32_t *) &sa->packet, sa->length); in handle_transaction()
498 struct subaction *sa, *prev; in handle_request_packet() local
503 sa = subaction_create(data, length); in handle_request_packet()
504 t->request = sa; in handle_request_packet()
519 if (prev->packet.common.tcode != sa->packet.common.tcode || in handle_request_packet()
520 prev->packet.common.tlabel != sa->packet.common.tlabel) { in handle_request_packet()
526 list_append(&t->request_list, &sa->link); in handle_request_packet()
528 switch (sa->ack) { in handle_request_packet()
563 struct subaction *sa, *prev; in handle_response_packet() local
572 sa = subaction_create(data, length); in handle_response_packet()
573 t->response = sa; in handle_response_packet()
585 if (prev->packet.common.tcode != sa->packet.common.tcode || in handle_response_packet()
586 prev->packet.common.tlabel != sa->packet.common.tlabel) { in handle_response_packet()
600 sa->packet.common.tcode) { in handle_response_packet()
605 list_append(&t->response_list, &sa->link); in handle_response_packet()
607 switch (sa->ack) { in handle_response_packet()