tlv
struct iwm_ucode_tlv tlv;
while (len >= sizeof(tlv)) {
memcpy(&tlv, data, sizeof(tlv));
tlv_len = le32toh(tlv.length);
tlv_type = le32toh(tlv.type);
len -= sizeof(tlv);
data += sizeof(tlv);
const struct iwn_fw_tlv *tlv;
while (ptr + sizeof (*tlv) <= end) {
tlv = (const struct iwn_fw_tlv *)ptr;
len = le32toh(tlv->len);
ptr += sizeof (*tlv);
if (tlv->alt != 0 && tlv->alt != htole16(alt))
switch (le16toh(tlv->type)) {
le16toh(tlv->type), len);
le16toh(tlv->type), len);
le16toh(tlv->type)));
tlv_check(const void *p, size_t size, const struct tlvhdr *tlv,
if ((const char *)tlv - (const char *)p + sizeof(*tlv) > size) {
if ((check_type && tlv->tlv_type != tmpl->tmpl_type) ||
tlv->tlv_length != tmpl->tmpl_length) {
tlv = (const struct tlvhdr *)
((const char *)tlv + tlv->tlv_length);
#define TLV_SET(tlv, type, length) \
(tlv)->tlv_type = (type); \
(tlv)->tlv_length = sizeof(*tlv) + (length); \
struct tlv tlvlist_lacp[LACP_TLV_NUM] = {
struct tlv tlvlist_marker[MARKER_TLV_NUM] = {
tlv_parse(void *vp, size_t len, struct tlv *list)
uint8_t *tlv;
tlv = (uint8_t *)(error + 1);
memcpy(tlv, error_tlv, tlv_length);
send_tlv(p, (struct tlv *)&al_tlv);
rv = send_tlv(p, (struct tlv *) nt);
send_tlv(p, (struct tlv *) notiftlv);
send_tlv(p, (struct tlv *) notiftlv);
send_tlv(p, (struct tlv *) notiftlv);
send_tlv(p, (struct tlv *) (void *) &ti);
send_tlv(p, (struct tlv *) (void *) &kt);
struct tlv *ttmp;
ttmp = (struct tlv *) (&recvspace[wo]);
const struct tlv * t)
send_tlv(const struct ldp_peer * p, const struct tlv * t)
ret = send_tlv(p, (struct tlv *) t);
const struct tlv *);
int send_tlv(const struct ldp_peer *, const struct tlv *);
debug_tlv(struct tlv * t)
void debug_tlv(struct tlv *);
prepare_release(struct tlv * v)
send_tlv(peer, (struct tlv *) lmt);
send_tlv(peer, (struct tlv *) lmt);
void prepare_release(struct tlv *);