]>
git.proxmox.com Git - mirror_frr.git/blob - pimd/pim_int.c
1 // SPDX-License-Identifier: GPL-2.0-or-later
4 * Copyright (C) 2008 Everton da Silva Marques
10 #include <netinet/in.h>
11 #include <arpa/inet.h>
15 uint32_t pim_read_uint32_host(const uint8_t *buf
)
18 memcpy(&val
, buf
, sizeof(val
));
19 /* val is in netorder */
21 /* val is in hostorder */
25 void pim_write_uint32(uint8_t *buf
, uint32_t val_host
)
27 /* val_host is in host order */
28 val_host
= htonl(val_host
);
29 /* val_host is in netorder */
30 memcpy(buf
, &val_host
, sizeof(val_host
));