• Home
  • Raw
  • Download

Lines Matching refs:p

93     char *p = (char*)ppacket;  /* really read a packet address */  in read_packet()  local
97 r = adb_read(fd, p, len); in read_packet()
100 p += r; in read_packet()
136 char *p = (char*) ppacket; /* we really write the packet address */ in write_packet() local
163 r = adb_write(fd, p, len); in write_packet()
166 p += r; in write_packet()
179 apacket *p = 0; in transport_socket_events() local
180 if(read_packet(fd, &p)){ in transport_socket_events()
183 handle_packet(p, (atransport *) _t); in transport_socket_events()
188 void send_packet(apacket *p, atransport *t) in send_packet() argument
194 p->msg.magic = p->msg.command ^ 0xffffffff; in send_packet()
196 count = p->msg.data_length; in send_packet()
197 x = (unsigned char *) p->data; in send_packet()
202 p->msg.data_check = sum; in send_packet()
204 print_packet("send", p); in send_packet()
211 if(write_packet(t->transport_socket, &p)){ in send_packet()
232 apacket *p; in output_thread() local
237 p = get_apacket(); in output_thread()
238 p->msg.command = A_SYNC; in output_thread()
239 p->msg.arg0 = 1; in output_thread()
240 p->msg.arg1 = ++(t->sync_token); in output_thread()
241 p->msg.magic = A_SYNC ^ 0xffffffff; in output_thread()
242 if(write_packet(t->fd, &p)) { in output_thread()
243 put_apacket(p); in output_thread()
250 p = get_apacket(); in output_thread()
252 if(t->read_from_remote(p, t) == 0){ in output_thread()
255 if(write_packet(t->fd, &p)){ in output_thread()
256 put_apacket(p); in output_thread()
261 D("from_remote: remote read failed for transport %p\n", p); in output_thread()
262 put_apacket(p); in output_thread()
268 p = get_apacket(); in output_thread()
269 p->msg.command = A_SYNC; in output_thread()
270 p->msg.arg0 = 0; in output_thread()
271 p->msg.arg1 = 0; in output_thread()
272 p->msg.magic = A_SYNC ^ 0xffffffff; in output_thread()
273 if(write_packet(t->fd, &p)) { in output_thread()
274 put_apacket(p); in output_thread()
288 apacket *p; in input_thread() local
295 if(read_packet(t->fd, &p)) { in input_thread()
300 if(p->msg.command == A_SYNC){ in input_thread()
301 if(p->msg.arg0 == 0) { in input_thread()
303 put_apacket(p); in input_thread()
306 if(p->msg.arg1 == t->sync_token) { in input_thread()
311 t, p->msg.arg1, t->sync_token); in input_thread()
317 t->write_to_remote(p, t); in input_thread()
323 put_apacket(p); in input_thread()
404 device_tracker_enqueue( asocket* socket, apacket* p ) in device_tracker_enqueue() argument
407 put_apacket(p); in device_tracker_enqueue()
417 apacket* p = get_apacket(); in device_tracker_send() local
420 memcpy(p->data, buffer, len); in device_tracker_send()
421 p->len = len; in device_tracker_send()
422 return peer->enqueue( peer, p ); in device_tracker_send()
500 char *p = (char*)m; in transport_read_action() local
505 r = adb_read(fd, p, len); in transport_read_action()
508 p += r; in transport_read_action()
522 char *p = (char*)m; in transport_write_action() local
527 r = adb_write(fd, p, len); in transport_write_action()
530 p += r; in transport_write_action()
802 char* p = buf; in list_transports() local
810 len = snprintf(p, end - p, "%s\t%s\n", in list_transports()
814 if (p + len >= end) { in list_transports()
818 p += len; in list_transports()
820 p[0] = 0; in list_transports()
822 return p - buf; in list_transports()
875 char *p = ptr; in readx() local
882 r = adb_read(fd, p, len); in readx()
885 p += r; in readx()
902 char *p = (char*) ptr; in writex() local
910 r = adb_write(fd, p, len); in writex()
913 p += r; in writex()
925 int check_header(apacket *p) in check_header() argument
927 if(p->msg.magic != (p->msg.command ^ 0xffffffff)) { in check_header()
932 if(p->msg.data_length > MAX_PAYLOAD) { in check_header()
933 D("check_header(): %d > MAX_PAYLOAD\n", p->msg.data_length); in check_header()
940 int check_data(apacket *p) in check_data() argument
945 count = p->msg.data_length; in check_data()
946 x = p->data; in check_data()
952 if(sum != p->msg.data_check) { in check_data()