Lines Matching refs:sub

337 bridge_addrs_index_append(struct asn_oid *oid, uint sub,  in bridge_addrs_index_append()  argument
342 oid->len = sub + ETHER_ADDR_LEN + 1; in bridge_addrs_index_append()
343 oid->subs[sub] = ETHER_ADDR_LEN; in bridge_addrs_index_append()
346 oid->subs[sub + i] = te->tp_addr[i - 1]; in bridge_addrs_index_append()
353 bridge_addrs_get(const struct asn_oid *oid, uint sub, in bridge_addrs_get() argument
359 if (oid->len - sub != ETHER_ADDR_LEN + 1 || in bridge_addrs_get()
360 oid->subs[sub] != ETHER_ADDR_LEN) in bridge_addrs_get()
364 tp_addr[i] = oid->subs[sub + i + 1]; in bridge_addrs_get()
374 bridge_addrs_getnext(const struct asn_oid *oid, uint sub, in bridge_addrs_getnext() argument
381 if (oid->len - sub == 0) in bridge_addrs_getnext()
384 if (oid->len - sub != ETHER_ADDR_LEN + 1 || in bridge_addrs_getnext()
385 oid->subs[sub] != ETHER_ADDR_LEN) in bridge_addrs_getnext()
389 tp_addr[i] = oid->subs[sub + i + 1]; in bridge_addrs_getnext()
399 uint sub, uint iidx __unused, enum snmp_op op) in op_dot1d_tp_fdb() argument
413 if ((te = bridge_addrs_get(&val->var, sub, bif)) == NULL) in op_dot1d_tp_fdb()
418 if ((te = bridge_addrs_getnext(&val->var, sub, bif)) == NULL) in op_dot1d_tp_fdb()
420 bridge_addrs_index_append(&val->var, sub, te); in op_dot1d_tp_fdb()
433 switch (val->var.subs[sub - 1]) { in op_dot1d_tp_fdb()
456 bridge_addrs_begemot_index_append(struct asn_oid *oid, uint sub, in bridge_addrs_begemot_index_append() argument
466 oid->len = sub++; in bridge_addrs_begemot_index_append()
484 bridge_addrs_begemot_get(const struct asn_oid *oid, uint sub) in bridge_addrs_begemot_get() argument
491 n_len = oid->subs[sub]; in bridge_addrs_begemot_get()
492 if (oid->len - sub != n_len + ETHER_ADDR_LEN + 3 || in bridge_addrs_begemot_get()
493 n_len >= IFNAMSIZ || oid->subs[sub + n_len + 1] != ETHER_ADDR_LEN) in bridge_addrs_begemot_get()
514 bridge_addrs_begemot_getnext(const struct asn_oid *oid, uint sub) in bridge_addrs_begemot_getnext() argument
522 if (oid->len - sub == 0) in bridge_addrs_begemot_getnext()
525 n_len = oid->subs[sub]; in bridge_addrs_begemot_getnext()
526 if (oid->len - sub != n_len + ETHER_ADDR_LEN + 2 || in bridge_addrs_begemot_getnext()
527 n_len >= IFNAMSIZ || oid->subs[sub + n_len + 1] != ETHER_ADDR_LEN) in bridge_addrs_begemot_getnext()
531 bif_name[i - 1] = oid->subs[sub + i]; in bridge_addrs_begemot_getnext()
536 tp_addr[i - 1] = oid->subs[sub + n_len + i + 1]; in bridge_addrs_begemot_getnext()
547 uint sub, uint iidx __unused, enum snmp_op op) in op_begemot_tp_fdb() argument
556 if ((te = bridge_addrs_begemot_get(&val->var, sub)) == NULL) in op_begemot_tp_fdb()
562 sub)) == NULL || in op_begemot_tp_fdb()
564 sub, te) < 0) in op_begemot_tp_fdb()
578 switch (val->var.subs[sub - 1]) { in op_begemot_tp_fdb()