if (area == NULL)
return NULL;
- oid_copy_addr(name + v->namelen, addr, sizeof(struct in_addr));
+ oid_copy_in_addr(name + v->namelen, addr);
*length = sizeof(struct in_addr) + v->namelen;
return area;
if (area == NULL)
return NULL;
- oid_copy_addr(name + v->namelen, addr, sizeof(struct in_addr));
+ oid_copy_in_addr(name + v->namelen, addr);
/* Set TOS 0. */
name[v->namelen + sizeof(struct in_addr)] = 0;
*length = v->namelen + sizeof(struct in_addr) + 1;
/* Fill in value. */
offset = name + v->namelen;
- oid_copy_addr(offset, area_id, IN_ADDR_SIZE);
+ oid_copy_in_addr(offset, area_id);
offset += IN_ADDR_SIZE;
*offset = lsa->data->type;
offset++;
- oid_copy_addr(offset, &lsa->data->id,
- IN_ADDR_SIZE);
+ oid_copy_in_addr(offset, &lsa->data->id);
offset += IN_ADDR_SIZE;
- oid_copy_addr(offset, &lsa->data->adv_router,
- IN_ADDR_SIZE);
+ oid_copy_in_addr(offset,
+ &lsa->data->adv_router);
return lsa;
}
/* Fill in value. */
offset = name + v->namelen;
- oid_copy_addr(offset, area_id, IN_ADDR_SIZE);
+ oid_copy_in_addr(offset, area_id);
offset += IN_ADDR_SIZE;
- oid_copy_addr(offset, range_net, IN_ADDR_SIZE);
+ oid_copy_in_addr(offset, range_net);
return range;
}
if (oi) {
*length = v->namelen + IN_ADDR_SIZE + 1;
offset = name + v->namelen;
- oid_copy_addr(offset, ifaddr, IN_ADDR_SIZE);
+ oid_copy_in_addr(offset, ifaddr);
offset += IN_ADDR_SIZE;
*offset = *ifindex;
return oi;
if (oi) {
*length = v->namelen + IN_ADDR_SIZE + 1 + 1;
offset = name + v->namelen;
- oid_copy_addr(offset, ifaddr, IN_ADDR_SIZE);
+ oid_copy_in_addr(offset, ifaddr);
offset += IN_ADDR_SIZE;
*offset = *ifindex;
offset++;
if (vl_data) {
*length = v->namelen + IN_ADDR_SIZE + IN_ADDR_SIZE;
- oid_copy_addr(name + v->namelen, area_id, IN_ADDR_SIZE);
- oid_copy_addr(name + v->namelen + IN_ADDR_SIZE,
- neighbor, IN_ADDR_SIZE);
+ oid_copy_in_addr(name + v->namelen, area_id);
+ oid_copy_in_addr(name + v->namelen + IN_ADDR_SIZE,
+ neighbor);
return vl_data;
}
}
if (nbr) {
*length = v->namelen + IN_ADDR_SIZE + 1;
- oid_copy_addr(name + v->namelen, nbr_addr,
- IN_ADDR_SIZE);
+ oid_copy_in_addr(name + v->namelen, nbr_addr);
name[v->namelen + IN_ADDR_SIZE] = *ifindex;
return nbr;
}
*offset = OSPF_AS_EXTERNAL_LSA;
offset++;
- oid_copy_addr(offset, &lsa->data->id, IN_ADDR_SIZE);
+ oid_copy_in_addr(offset, &lsa->data->id);
offset += IN_ADDR_SIZE;
- oid_copy_addr(offset, &lsa->data->adv_router,
- IN_ADDR_SIZE);
+ oid_copy_in_addr(offset, &lsa->data->adv_router);
return lsa;
}
zlog_info("%s: trap sent: %pI4 now %s", __func__,
&on->address.u.prefix4, msgbuf);
- oid_copy_addr(index, &(on->address.u.prefix4), IN_ADDR_SIZE);
+ oid_copy_in_addr(index, &(on->address.u.prefix4));
index[IN_ADDR_SIZE] = 0;
smux_trap(ospf_variables, array_size(ospf_variables), ospf_trap_oid,
zlog_info("ospfTrapVirtNbrStateChange trap sent");
- oid_copy_addr(index, &(on->address.u.prefix4), IN_ADDR_SIZE);
+ oid_copy_in_addr(index, &(on->address.u.prefix4));
index[IN_ADDR_SIZE] = 0;
smux_trap(ospf_variables, array_size(ospf_variables), ospf_trap_oid,
&oi->address->u.prefix4,
lookup_msg(ospf_ism_state_msg, oi->state, NULL));
- oid_copy_addr(index, &(oi->address->u.prefix4), IN_ADDR_SIZE);
+ oid_copy_in_addr(index, &(oi->address->u.prefix4));
index[IN_ADDR_SIZE] = 0;
smux_trap(ospf_variables, array_size(ospf_variables), ospf_trap_oid,
zlog_info("ospfTrapVirtIfStateChange trap sent");
- oid_copy_addr(index, &(oi->address->u.prefix4), IN_ADDR_SIZE);
+ oid_copy_in_addr(index, &(oi->address->u.prefix4));
index[IN_ADDR_SIZE] = 0;
smux_trap(ospf_variables, array_size(ospf_variables), ospf_trap_oid,
FRR_MODULE_SETUP(.name = "ospfd_snmp", .version = FRR_VERSION,
.description = "ospfd AgentX SNMP module",
- .init = ospf_snmp_module_init, )
+ .init = ospf_snmp_module_init,
+);