#include <vnet/dpo/replicate_dpo.h>
#include <vnet/srv6/sr_pt.h>
+#include <vppinfra/byte_order.h>
#include <vppinfra/error.h>
#include <vppinfra/elog.h>
sizeof (ip6_address_t) * (srh->last_entry + 1));
unix_time_now_nsec_fraction (&ts.sec, &ts.nsec);
- srh_pt_tlv->t64.sec = htobe32 (ts.sec);
- srh_pt_tlv->t64.nsec = htobe32 (ts.nsec);
+ srh_pt_tlv->t64.sec = clib_host_to_net_u32 (ts.sec);
+ srh_pt_tlv->t64.nsec = clib_host_to_net_u32 (ts.nsec);
ls = sr_pt_find_iface (vnet_buffer (b0)->sw_if_index[VLIB_RX]);
if (ls)
{
id_ld = ls->id << 4;
id_ld |= ls->ingress_load;
- srh_pt_tlv->id_ld = htobe16 (id_ld);
+ srh_pt_tlv->id_ld = clib_host_to_net_u16 (id_ld);
}
}
"outgoing interface load %u, t64_sec %u, t64_nsec %u, tts_template "
"%u, tts %u",
format_vnet_sw_if_index_name, vnet_get_main (), t->iface, t->id,
- t->load, htobe32 (t->t64.sec), htobe32 (t->t64.nsec), t->tts_template,
- t->tts);
+ t->load, clib_host_to_net_u32 (t->t64.sec),
+ clib_host_to_net_u32 (t->t64.nsec), t->tts_template, t->tts);
break;
default:
break;
hbh_opt_pt = (void *) (hbh_opt + 1);
clib_memcpy_fast (&hbh_opt_pt->cmd_stack[1],
&hbh_opt_pt->cmd_stack[0], 33);
- hbh_opt_pt->cmd_stack[0].oif_oil = htobe16 (ls->id << 4);
+ hbh_opt_pt->cmd_stack[0].oif_oil =
+ clib_host_to_net_u16 (ls->id << 4);
hbh_opt_pt->cmd_stack[0].oif_oil |= ls->egress_load;
switch (ls->tts_template)
{
to_next += 1;
n_left_from -= 1;
n_left_to_next -= 1;
- timestamp_64_t t64;
+ timestamp_64_t t64 = {};
b0 = vlib_get_buffer (vm, bi0);
iface = vnet_buffer (b0)->sw_if_index[VLIB_TX];