Lines Matching defs:length
100 if (m->length + data_length > ETHER_MAX_LEN)
103 p = m->pdu + m->length;
105 m->length += data_length;
148 m->container_pos = m->pdu + m->length;
161 type |= htons(((m->pdu + m->length) - (m->container_pos + 2)) & 0x01ff);
242 *data_length = m->container->data + m->container->length - m->container->read_pos;
260 *data_length = m->container->data + m->container->length - m->container->read_pos;
291 section->length = ntohs(t) & 0x01ff;
301 section->length >= LLDP_OUI_LEN + 1) {
306 section->length -= LLDP_OUI_LEN + 1;
315 p += section->length;
316 l += (section->length + 2);
396 static int lldp_tlv_packet_read_string_tlv(tlv_packet *tlv, uint16_t type, char **data, uint16_t *length) {
406 r = tlv_packet_read_string(tlv, &s, length);
421 uint16_t *length) {
438 r = tlv_packet_read_bytes(tlv, data, length);
459 uint16_t *length) {
480 r = tlv_packet_read_string(tlv, &s, length);
489 r = tlv_packet_read_bytes(tlv, data, length);
513 uint16_t *length) {
514 return lldp_tlv_packet_read_string_tlv(tlv, LLDP_TYPE_SYSTEM_NAME, data, length);
519 uint16_t *length) {
520 return lldp_tlv_packet_read_string_tlv(tlv, LLDP_TYPE_SYSTEM_DESCRIPTION, data, length);
525 uint16_t *length) {
526 return lldp_tlv_packet_read_string_tlv(tlv, LLDP_TYPE_PORT_DESCRIPTION, data, length);
566 int sd_lldp_packet_read_vlan_name(tlv_packet *tlv, uint16_t *vlan_id, char **name, uint16_t *length) {
580 r = tlv_packet_read_string(tlv, name, length);
582 if (r >= 0 && len < *length)
583 *length = len;