Lines Matching refs:packet

519 socketTransport_writePacket(jdwpTransportEnv* env, const jdwpPacket *packet)
528 /* packet can't be null */
529 if (packet == NULL) {
530 RETURN_ERROR(JDWPTRANSPORT_ERROR_ILLEGAL_ARGUMENT, "packet is NULL");
533 len = packet->type.cmd.len; /* includes header */
536 /* bad packet */
543 id = (jint)dbgsysHostToNetworkLong(packet->type.cmd.id);
547 header[8] = packet->type.cmd.flags;
548 if (packet->type.cmd.flags & JDWPTRANSPORT_FLAGS_REPLY) {
550 dbgsysHostToNetworkShort(packet->type.reply.errorCode);
553 header[9] = packet->type.cmd.cmdSet;
554 header[10] = packet->type.cmd.cmd;
557 data = packet->type.cmd.data;
614 socketTransport_readPacket(jdwpTransportEnv* env, jdwpPacket* packet) {
618 /* packet can't be null */
619 if (packet == NULL) {
620 RETURN_ERROR(JDWPTRANSPORT_ERROR_ILLEGAL_ARGUMENT, "packet is null");
628 packet->type.cmd.len = 0;
636 packet->type.cmd.len = length;
639 n = recv_fully(socketFD,(char *)&(packet->type.cmd.id),sizeof(jint));
644 packet->type.cmd.id = (jint)dbgsysNetworkToHostLong(packet->type.cmd.id);
646 n = recv_fully(socketFD,(char *)&(packet->type.cmd.flags),sizeof(jbyte));
651 if (packet->type.cmd.flags & JDWPTRANSPORT_FLAGS_REPLY) {
652 n = recv_fully(socketFD,(char *)&(packet->type.reply.errorCode),sizeof(jbyte));
661 n = recv_fully(socketFD,(char *)&(packet->type.cmd.cmdSet),sizeof(jbyte));
666 n = recv_fully(socketFD,(char *)&(packet->type.cmd.cmd),sizeof(jbyte));
675 setLastError(0, "Badly formed packet received - invalid length");
678 packet->type.cmd.data = NULL;
680 packet->type.cmd.data= (*callback->alloc)(data_len);
682 if (packet->type.cmd.data == NULL) {
686 n = recv_fully(socketFD,(char *)packet->type.cmd.data, data_len);
688 (*callback->free)(packet->type.cmd.data);