Skip to content

Commit 7a5529f

Browse files
authored
Add missing const to bip6-init.c and use zsock API. (#46)
2 parents 09a0970 + 4828f35 commit 7a5529f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

zephyr/subsys/bacnet_datalink/bip6-init.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ void bip6_get_my_address(BACNET_ADDRESS *addr)
223223
*
224224
* @param addr - network IPv6 address
225225
*/
226-
bool bip6_set_addr(BACNET_IP6_ADDRESS *addr)
226+
bool bip6_set_addr(const BACNET_IP6_ADDRESS *addr)
227227
{
228228
return bvlc6_address_copy(&BIP6_Addr, addr);
229229
}
@@ -243,7 +243,7 @@ bool bip6_get_addr(BACNET_IP6_ADDRESS *addr)
243243
*
244244
* @param addr - network IPv6 address
245245
*/
246-
bool bip6_set_broadcast_addr(BACNET_IP6_ADDRESS *addr)
246+
bool bip6_set_broadcast_addr(const BACNET_IP6_ADDRESS *addr)
247247
{
248248
return bvlc6_address_copy(&BIP6_Broadcast_Addr, addr);
249249
}
@@ -269,7 +269,7 @@ bool bip6_get_broadcast_addr(BACNET_IP6_ADDRESS *addr)
269269
* @return Upon successful completion, returns the number of bytes sent.
270270
* Otherwise, -1 shall be returned and errno set to indicate the error.
271271
*/
272-
int bip6_send_mpdu(BACNET_IP6_ADDRESS *dest, uint8_t *mtu, uint16_t mtu_len)
272+
int bip6_send_mpdu(const BACNET_IP6_ADDRESS *dest, const uint8_t *mtu, uint16_t mtu_len)
273273
{
274274
struct sockaddr_in6 bvlc_dest = { 0 };
275275
uint16_t addr16[8];
@@ -522,7 +522,7 @@ bool bip6_init(char *ifname)
522522
sizeof(struct in6_addr));
523523
/* Let system not choose the interface */
524524
join_request.ipv6mr_ifindex = BIP6_Socket_Scope_Id;
525-
status = setsockopt(
525+
status = zsock_setsockopt(
526526
BIP6_Socket, IPPROTO_IPV6, IPV6_ADD_MEMBERSHIP, &join_request,
527527
sizeof(join_request));
528528
if (status < 0) {

0 commit comments

Comments
 (0)