Home
last modified time | relevance | path

Searched refs:packet (Results 1 – 25 of 803) sorted by relevance

12345678910>>...33

/external/webrtc/webrtc/modules/video_coding/
Ddecoding_state_unittest.cc34 VCMPacket packet; in TEST() local
35 packet.isFirstPacket = true; in TEST()
36 packet.timestamp = 1; in TEST()
37 packet.seqNum = 0xffff; in TEST()
38 packet.frameType = kVideoFrameDelta; in TEST()
39 packet.codecSpecificHeader.codec = kRtpVideoVp8; in TEST()
40 packet.codecSpecificHeader.codecHeader.VP8.pictureId = 0x007F; in TEST()
44 EXPECT_LE(0, frame.InsertPacket(packet, 0, kNoErrors, frame_data)); in TEST()
48 packet.frameType = kVideoFrameKey; in TEST()
49 EXPECT_LE(0, frame_key.InsertPacket(packet, 0, kNoErrors, frame_data)); in TEST()
[all …]
/external/webrtc/webrtc/modules/audio_coding/neteq/
Dpayload_splitter_unittest.cc79 Packet* packet = new Packet; in CreateRedPayload() local
80 packet->header.payloadType = kRedPayloadType; in CreateRedPayload()
81 packet->header.timestamp = kBaseTimestamp; in CreateRedPayload()
82 packet->header.sequenceNumber = kSequenceNumber; in CreateRedPayload()
83 packet->payload_length = (kPayloadLength + 1) + in CreateRedPayload()
85 uint8_t* payload = new uint8_t[packet->payload_length]; in CreateRedPayload()
118 packet->payload = payload; in CreateRedPayload()
119 return packet; in CreateRedPayload()
125 Packet* packet = new Packet; in CreatePacket() local
126 packet->header.payloadType = payload_type; in CreatePacket()
[all …]
Dpayload_splitter.cc129 Packet* packet = (*it); // Just to make the notation more intuitive. in SplitFec() local
131 uint8_t payload_type = packet->header.payloadType; in SplitFec()
139 if (packet->sync_packet) { in SplitFec()
149 !decoder->PacketHasFec(packet->payload, packet->payload_length)) { in SplitFec()
159 packet->primary = true; in SplitFec()
162 new_packet->header = packet->header; in SplitFec()
164 PacketDurationRedundant(packet->payload, packet->payload_length); in SplitFec()
166 new_packet->payload = new uint8_t[packet->payload_length]; in SplitFec()
167 memcpy(new_packet->payload, packet->payload, packet->payload_length); in SplitFec()
168 new_packet->payload_length = packet->payload_length; in SplitFec()
[all …]
Dpacket_buffer.cc32 bool operator()(Packet* packet) { in operator ()() argument
33 return (*new_packet_ >= *packet); in operator ()()
57 int PacketBuffer::InsertPacket(Packet* packet) { in InsertPacket() argument
58 if (!packet || !packet->payload) { in InsertPacket()
59 if (packet) { in InsertPacket()
60 delete packet; in InsertPacket()
80 NewTimestampIsLarger(packet)); in InsertPacket()
86 packet->header.timestamp == (*rit)->header.timestamp) { in InsertPacket()
87 delete [] packet->payload; in InsertPacket()
88 delete packet; in InsertPacket()
[all …]
Dpacket_buffer_unittest.cc53 Packet* packet = new Packet; in NextPacket() local
54 packet->header.sequenceNumber = seq_no_; in NextPacket()
55 packet->header.timestamp = ts_; in NextPacket()
56 packet->header.payloadType = pt_; in NextPacket()
57 packet->header.markerBit = false; in NextPacket()
58 packet->header.ssrc = 0x12345678; in NextPacket()
59 packet->header.numCSRCs = 0; in NextPacket()
60 packet->header.paddingLength = 0; in NextPacket()
61 packet->payload_length = payload_size_bytes; in NextPacket()
62 packet->primary = true; in NextPacket()
[all …]
/external/apache-harmony/jdwp/src/test/java/org/apache/harmony/jpda/tests/framework/jdwp/
DParsedEvent.java44 protected ParsedEvent(byte suspendPolicy, Packet packet, byte eventKind) { in ParsedEvent() argument
46 this.requestID = packet.getNextValueAsInt(); in ParsedEvent()
88 protected EventThread(byte suspendPolicy, Packet packet, byte eventKind) { in EventThread() argument
89 super(suspendPolicy, packet, eventKind); in EventThread()
90 this.threadID = packet.getNextValueAsThreadID(); in EventThread()
114 protected EventThreadLocation(byte suspendPolicy, Packet packet, in EventThreadLocation() argument
116 super(suspendPolicy, packet, eventKind); in EventThreadLocation()
117 this.location = packet.getNextValueAsLocation(); in EventThreadLocation()
142 protected EventThreadMonitor(byte suspendPolicy, Packet packet, in EventThreadMonitor() argument
144 super(suspendPolicy, packet, eventKind); in EventThreadMonitor()
[all …]
/external/webrtc/webrtc/modules/remote_bitrate_estimator/
Dremote_estimator_proxy_unittest.cc27 MOCK_METHOD1(SendFeedback, bool(rtcp::TransportFeedback* packet));
66 .WillOnce(Invoke([this](rtcp::TransportFeedback* packet) { in TEST_F() argument
67 packet->Build(); in TEST_F()
68 EXPECT_EQ(kBaseSeq, packet->GetBaseSequence()); in TEST_F()
69 EXPECT_EQ(kMediaSsrc, packet->GetMediaSourceSsrc()); in TEST_F()
72 packet->GetStatusVector(); in TEST_F()
76 std::vector<int64_t> delta_vec = packet->GetReceiveDeltasUs(); in TEST_F()
78 EXPECT_EQ(kBaseTimeMs, (packet->GetBaseTimeUs() + delta_vec[0]) / 1000); in TEST_F()
92 .WillOnce(Invoke([this](rtcp::TransportFeedback* packet) { in TEST_F() argument
93 packet->Build(); in TEST_F()
[all …]
/external/ppp/pppd/plugins/rp-pppoe/
Dcommon.c45 parsePacket(PPPoEPacket *packet, ParseFunc *func, void *extra) in parsePacket() argument
47 UINT16_t len = ntohs(packet->length); in parsePacket()
51 if (PPPOE_VER(packet->vertype) != 1) { in parsePacket()
52 error("Invalid PPPoE version (%d)", PPPOE_VER(packet->vertype)); in parsePacket()
55 if (PPPOE_TYPE(packet->vertype) != 1) { in parsePacket()
56 error("Invalid PPPoE type (%d)", PPPOE_TYPE(packet->vertype)); in parsePacket()
67 curTag = packet->payload; in parsePacket()
68 while(curTag - packet->payload < len) { in parsePacket()
75 if ((curTag - packet->payload) + tagLen + TAG_HDR_SIZE > len) { in parsePacket()
98 PPPoEPacket packet; in sendPADT() local
[all …]
Ddiscovery.c105 packetIsForMe(PPPoEConnection *conn, PPPoEPacket *packet) in packetIsForMe() argument
110 if (memcmp(packet->ethHdr.h_dest, conn->myEth, ETH_ALEN)) return 0; in packetIsForMe()
115 parsePacket(packet, parseForHostUniq, &forMe); in packetIsForMe()
265 PPPoEPacket packet; in sendPADI() local
266 unsigned char *cursor = packet.payload; in sendPADI()
267 PPPoETag *svc = (PPPoETag *) (&packet.payload); in sendPADI()
280 memset(packet.ethHdr.h_dest, 0xFF, ETH_ALEN); in sendPADI()
281 memcpy(packet.ethHdr.h_source, conn->myEth, ETH_ALEN); in sendPADI()
283 packet.ethHdr.h_proto = htons(Eth_PPPOE_Discovery); in sendPADI()
284 packet.vertype = PPPOE_VER_TYPE(1, 1); in sendPADI()
[all …]
Ddebug.c86 dumpPacket(FILE *fp, PPPoEPacket *packet, char const *dir) in dumpPacket() argument
88 int len = ntohs(packet->length); in dumpPacket()
97 UINT16_t type = etherType(packet); in dumpPacket()
113 switch(packet->code) { in dumpPacket()
125 (int) ntohs(packet->session), in dumpPacket()
132 (unsigned) packet->ethHdr.h_source[0], in dumpPacket()
133 (unsigned) packet->ethHdr.h_source[1], in dumpPacket()
134 (unsigned) packet->ethHdr.h_source[2], in dumpPacket()
135 (unsigned) packet->ethHdr.h_source[3], in dumpPacket()
136 (unsigned) packet->ethHdr.h_source[4], in dumpPacket()
[all …]
/external/autotest/client/cros/
Ddhcp_packet.py511 packet = DhcpPacket()
512 packet.set_field(FIELD_OP, FIELD_VALUE_OP_CLIENT_REQUEST)
513 packet.set_field(FIELD_HWTYPE, FIELD_VALUE_HWTYPE_10MB_ETH)
514 packet.set_field(FIELD_HWADDR_LEN, FIELD_VALUE_HWADDR_LEN_10MB_ETH)
515 packet.set_field(FIELD_RELAY_HOPS, 0)
516 packet.set_field(FIELD_TRANSACTION_ID, random.getrandbits(32))
517 packet.set_field(FIELD_TIME_SINCE_START, 0)
518 packet.set_field(FIELD_FLAGS, 0)
519 packet.set_field(FIELD_CLIENT_IP, IPV4_NULL_ADDRESS)
520 packet.set_field(FIELD_YOUR_IP, IPV4_NULL_ADDRESS)
[all …]
/external/apache-harmony/jdwp/src/test/java/org/apache/harmony/jpda/tests/jdwp/ClassType/
DInvokeMethodTest.java66 CommandPacket packet = new CommandPacket( in testInvokeMethod001() local
70 packet.setNextValueAsString(classSig); in testInvokeMethod001()
71 ReplyPacket reply = debuggeeWrapper.vmMirror.performCommand(packet); in testInvokeMethod001()
91 packet = new CommandPacket( in testInvokeMethod001()
94 packet.setNextValueAsClassID(typeID); in testInvokeMethod001()
95 reply = debuggeeWrapper.vmMirror.performCommand(packet); in testInvokeMethod001()
115 packet = new CommandPacket( in testInvokeMethod001()
118 packet.setNextValueAsByte(JDWPConstants.EventKind.METHOD_ENTRY); in testInvokeMethod001()
119 packet.setNextValueAsByte(JDWPConstants.SuspendPolicy.ALL); in testInvokeMethod001()
120 packet.setNextValueAsInt(1); in testInvokeMethod001()
[all …]
DNewInstanceTest.java64 CommandPacket packet = new CommandPacket( in testNewInstance001() local
68 packet.setNextValueAsString(classSig); in testNewInstance001()
69 ReplyPacket reply = debuggeeWrapper.vmMirror.performCommand(packet); in testNewInstance001()
87 packet = new CommandPacket( in testNewInstance001()
90 packet.setNextValueAsClassID(typeID); in testNewInstance001()
91 reply = debuggeeWrapper.vmMirror.performCommand(packet); in testNewInstance001()
111 packet = new CommandPacket( in testNewInstance001()
114 packet.setNextValueAsByte(JDWPConstants.EventKind.METHOD_ENTRY); in testNewInstance001()
115 packet.setNextValueAsByte(JDWPConstants.SuspendPolicy.ALL); in testNewInstance001()
116 packet.setNextValueAsInt(1); in testNewInstance001()
[all …]
DInvokeMethod002Test.java58 CommandPacket packet = new CommandPacket( in testInvokeMethod() local
62 packet.setNextValueAsString(classSig); in testInvokeMethod()
64 ReplyPacket reply = debuggeeWrapper.vmMirror.performCommand(packet); in testInvokeMethod()
84 packet = new CommandPacket( in testInvokeMethod()
87 packet.setNextValueAsClassID(classID); in testInvokeMethod()
89 reply = debuggeeWrapper.vmMirror.performCommand(packet); in testInvokeMethod()
109 packet = new CommandPacket( in testInvokeMethod()
112 packet.setNextValueAsByte(JDWPConstants.EventKind.METHOD_ENTRY); in testInvokeMethod()
113 packet.setNextValueAsByte(JDWPConstants.SuspendPolicy.ALL); in testInvokeMethod()
114 packet.setNextValueAsInt(1); in testInvokeMethod()
[all …]
/external/webrtc/webrtc/modules/audio_coding/neteq/tools/
Dpacket_unittest.cc54 Packet packet(packet_memory, kPacketLengthBytes, kPacketTime); in TEST() local
55 ASSERT_TRUE(packet.valid_header()); in TEST()
56 EXPECT_EQ(kPayloadType, packet.header().payloadType); in TEST()
57 EXPECT_EQ(kSequenceNumber, packet.header().sequenceNumber); in TEST()
58 EXPECT_EQ(kTimestamp, packet.header().timestamp); in TEST()
59 EXPECT_EQ(kSsrc, packet.header().ssrc); in TEST()
60 EXPECT_EQ(0, packet.header().numCSRCs); in TEST()
61 EXPECT_EQ(kPacketLengthBytes, packet.packet_length_bytes()); in TEST()
63 packet.payload_length_bytes()); in TEST()
64 EXPECT_EQ(kPacketLengthBytes, packet.virtual_packet_length_bytes()); in TEST()
[all …]
Drtp_analyze.cc107 rtc::scoped_ptr<webrtc::test::Packet> packet; in main() local
109 packet.reset(file_source->NextPacket()); in main()
110 if (!packet.get()) { in main()
118 packet->header().sequenceNumber, in main()
119 packet->header().timestamp, in main()
120 static_cast<unsigned int>(packet->time_ms()), in main()
121 static_cast<int>(packet->virtual_packet_length_bytes()), in main()
122 packet->header().payloadType, in main()
123 packet->header().markerBit, in main()
124 packet->header().ssrc); in main()
[all …]
/external/webrtc/webrtc/modules/rtp_rtcp/source/
Drtp_format_vp9_unittest.cc75 void ParseAndCheckPacket(const uint8_t* packet, in ParseAndCheckPacket() argument
81 ASSERT_TRUE(depacketizer->Parse(&parsed, packet, expected_length)); in ParseAndCheckPacket()
85 VerifyPayload(parsed, packet + expected_hdr_length, kExpectedPayloadLength); in ParseAndCheckPacket()
149 void CheckPayload(const uint8_t* packet, in CheckPayload() argument
154 EXPECT_EQ(packet[i], payload_[payload_pos_++]); in CheckPayload()
477 uint8_t packet[4] = {0}; in TEST_F() local
478 packet[0] = 0x0C; // I:0 P:0 L:0 F:0 B:1 E:1 V:0 R:0 in TEST_F()
481 ParseAndCheckPacket(packet, expected_, kHeaderLength, sizeof(packet)); in TEST_F()
486 uint8_t packet[10] = {0}; in TEST_F() local
487 packet[0] = 0x80; // I:1 P:0 L:0 F:0 B:0 E:0 V:0 R:0 in TEST_F()
[all …]
Drtp_format_vp8_unittest.cc429 uint8_t packet[4] = {0}; in TEST_F() local
430 packet[0] = 0x14; // Binary 0001 0100; S = 1, PartID = 4. in TEST_F()
431 packet[1] = 0x01; // P frame. in TEST_F()
434 ASSERT_TRUE(depacketizer_->Parse(&payload, packet, sizeof(packet))); in TEST_F()
436 &payload, packet + kHeaderLength, sizeof(packet) - kHeaderLength); in TEST_F()
448 uint8_t packet[10] = {0}; in TEST_F() local
449 packet[0] = 0xA0; in TEST_F()
450 packet[1] = 0x80; in TEST_F()
451 packet[2] = kPictureId; in TEST_F()
454 ASSERT_TRUE(depacketizer_->Parse(&payload, packet, sizeof(packet))); in TEST_F()
[all …]
/external/apache-harmony/jdwp/src/test/java/org/apache/harmony/jpda/tests/jdwp/ObjectReference/
DInvokeMethodTest.java60 CommandPacket packet = new CommandPacket( in setEventRequest() local
63 packet.setNextValueAsByte(JDWPConstants.EventKind.METHOD_ENTRY); in setEventRequest()
64 packet.setNextValueAsByte(JDWPConstants.SuspendPolicy.ALL); in setEventRequest()
65 packet.setNextValueAsInt(1); in setEventRequest()
66 packet.setNextValueAsByte((byte) 5); in setEventRequest()
67 packet.setNextValueAsString("*.InvokeMethodDebuggee"); in setEventRequest()
70 ReplyPacket reply = debuggeeWrapper.vmMirror.performCommand(packet); in setEventRequest()
107 CommandPacket packet = new CommandPacket( in clearEvent() local
110 packet.setNextValueAsByte(JDWPConstants.EventKind.METHOD_ENTRY); in clearEvent()
111 packet.setNextValueAsInt(requestID); in clearEvent()
[all …]
/external/webrtc/talk/media/base/
Drtpdump_unittest.cc78 RtpDumpPacket packet; in TEST() local
88 EXPECT_EQ(rtc::SR_SUCCESS, reader->ReadPacket(&packet)); in TEST()
97 EXPECT_EQ(rtc::SR_SUCCESS, reader->ReadPacket(&packet)); in TEST()
106 EXPECT_EQ(rtc::SR_ERROR, reader->ReadPacket(&packet)); in TEST()
115 EXPECT_EQ(rtc::SR_ERROR, reader->ReadPacket(&packet)); in TEST()
128 RtpDumpPacket packet; in TEST() local
131 EXPECT_EQ(rtc::SR_SUCCESS, reader.ReadPacket(&packet)); in TEST()
133 EXPECT_TRUE(GetRtpSsrc(&packet.data[0], packet.data.size(), &ssrc)); in TEST()
137 EXPECT_EQ(rtc::SR_EOS, reader.ReadPacket(&packet)); in TEST()
145 EXPECT_EQ(rtc::SR_SUCCESS, reader_w_ssrc.ReadPacket(&packet)); in TEST()
[all …]
/external/libopus/tests/
Dtest_opus_api.c89 unsigned char packet[1276]; in test_dec_api() local
188 VG_UNDEF(packet,sizeof(packet)); in test_dec_api()
189 packet[0]=63<<2;packet[1]=packet[2]=0; in test_dec_api()
190 if(opus_decode(dec, packet, 3, sbuf, 960, 0)!=960)test_failed(); in test_dec_api()
196 packet[0]=1; in test_dec_api()
197 if(opus_decode(dec, packet, 1, sbuf, 960, 0)!=960)test_failed(); in test_dec_api()
247 VG_UNDEF(packet,sizeof(packet)); in test_dec_api()
248 packet[0]=0; in test_dec_api()
249 if(opus_decoder_get_nb_samples(dec,packet,1)!=480)test_failed(); in test_dec_api()
250 if(opus_packet_get_nb_samples(packet,1,48000)!=480)test_failed(); in test_dec_api()
[all …]
/external/webrtc/webrtc/modules/video_coding/test/
Dstream_generator.cc61 VCMPacket packet; in GeneratePacket() local
62 packet.seqNum = sequence_number; in GeneratePacket()
63 packet.timestamp = timestamp; in GeneratePacket()
64 packet.frameType = type; in GeneratePacket()
65 packet.isFirstPacket = first_packet; in GeneratePacket()
66 packet.markerBit = marker_bit; in GeneratePacket()
67 packet.sizeBytes = size; in GeneratePacket()
68 packet.dataPtr = packet_buffer_; in GeneratePacket()
69 if (packet.isFirstPacket) in GeneratePacket()
70 packet.completeNALU = kNaluStart; in GeneratePacket()
[all …]
/external/apache-harmony/jdwp/src/test/java/org/apache/harmony/jpda/tests/jdwp/StackFrame/
DSetValuesTest.java66 CommandPacket packet = new CommandPacket(StackFrameCommandSet.CommandSetID, in testSetValues002_InvalidObjectError() local
68 packet.setNextValueAsThreadID(invalidThreadID); in testSetValues002_InvalidObjectError()
69 packet.setNextValueAsFrameID(0); in testSetValues002_InvalidObjectError()
70 packet.setNextValueAsInt(0); in testSetValues002_InvalidObjectError()
71 ReplyPacket replyPacket = debuggeeWrapper.vmMirror.performCommand(packet); in testSetValues002_InvalidObjectError()
86 CommandPacket packet = new CommandPacket(StackFrameCommandSet.CommandSetID, in testSetValues003_ThreadNotSuspendedError() local
88 packet.setNextValueAsThreadID(threadID); in testSetValues003_ThreadNotSuspendedError()
89 packet.setNextValueAsFrameID(0); in testSetValues003_ThreadNotSuspendedError()
90 packet.setNextValueAsInt(0); in testSetValues003_ThreadNotSuspendedError()
91 ReplyPacket replyPacket = debuggeeWrapper.vmMirror.performCommand(packet); in testSetValues003_ThreadNotSuspendedError()
[all …]
/external/autotest/server/cros/chaos_lib/
Dchaos_capture_analyzer.py59 def get_packet_after(self, packet): argument
69 return self.get_packet_number(int(packet.number) + 1, summary=False)
422 def _fetch_packet_field_value(self, packet, field): argument
423 layer_object = packet
431 def _match_packet_fields(self, packet, fields): argument
433 value = self._fetch_packet_field_value(packet, field)
438 def _fetch_packet_data_rate(self, packet): argument
439 return self._fetch_packet_field_value(packet,
442 def _does_packet_match_state(self, state, packet): argument
444 if self._match_packet_fields(packet, fields):
[all …]
/external/toybox/toys/pending/
Dtftp.c181 static inline int check_data( uint8_t *packet, uint16_t *opcode, in check_data() argument
184 *opcode = (uint16_t) packet[0] << 8 | (uint16_t) packet[1]; in check_data()
186 *blockno = (uint16_t) packet[2] << 8 | (uint16_t) packet[3]; in check_data()
193 static int mkpkt_data(int fd, off_t offset, uint8_t *packet, uint16_t blockno) in mkpkt_data() argument
198 packet[0] = TFTP_OP_DATA >> 8; in mkpkt_data()
199 packet[1] = TFTP_OP_DATA & 0xff; in mkpkt_data()
200 packet[2] = blockno >> 8; in mkpkt_data()
201 packet[3] = blockno & 0xff; in mkpkt_data()
207 nbytesread = readall(fd, &packet[TFTP_DATAHEADERSIZE], TFTP_DATASIZE); in mkpkt_data()
213 static int read_ack(int sd, uint8_t *packet, struct sockaddr_storage *server, in read_ack() argument
[all …]

12345678910>>...33