Skip to content

Commit

Permalink
feat: rename _z_bytes_ to _z_slice
Browse files Browse the repository at this point in the history
  • Loading branch information
jean-roland committed Jun 10, 2024
1 parent 598ee96 commit ffd898d
Show file tree
Hide file tree
Showing 75 changed files with 393 additions and 404 deletions.
18 changes: 9 additions & 9 deletions include/zenoh-pico/api/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ typedef _z_timestamp_t z_timestamp_t;
* size_t len: The length of the bytes array.
* uint8_t *start: A pointer to the bytes array.
*/
_OWNED_TYPE_PTR(_z_bytes_t, slice)
_LOANED_TYPE(_z_bytes_t, slice)
_OWNED_TYPE_PTR(_z_slice_t, slice)
_LOANED_TYPE(_z_slice_t, slice)

/**
* Represents a string without null-terminator.
Expand Down Expand Up @@ -625,22 +625,22 @@ typedef struct {

void z_closure_zid_call(const z_owned_closure_zid_t *closure, const z_id_t *id);
#if Z_FEATURE_ATTACHMENT == 1
struct _z_bytes_pair_t {
_z_bytes_t *key;
_z_bytes_t *value;
struct _z_slice_pair_t {
_z_slice_t *key;
_z_slice_t *value;
};

void _z_bytes_pair_clear(struct _z_bytes_pair_t *this_);
void _z_slice_pair_clear(struct _z_slice_pair_t *this_);

_Z_ELEM_DEFINE(_z_bytes_pair, struct _z_bytes_pair_t, _z_noop_size, _z_bytes_pair_clear, _z_noop_copy)
_Z_LIST_DEFINE(_z_bytes_pair, struct _z_bytes_pair_t)
_Z_ELEM_DEFINE(_z_slice_pair, struct _z_slice_pair_t, _z_noop_size, _z_slice_pair_clear, _z_noop_copy)
_Z_LIST_DEFINE(_z_slice_pair, struct _z_slice_pair_t)

/**
* A map of maybe-owned vector of bytes to maybe-owned vector of bytes.
*/
// TODO(sashacmc): z_owned_bytes_map_t for attachment
typedef struct z_owned_bytes_map_t {
_z_bytes_pair_list_t *_inner;
_z_slice_pair_list_t *_inner;
} z_owned_bytes_map_t;

/**
Expand Down
32 changes: 16 additions & 16 deletions include/zenoh-pico/collections/bytes.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <stddef.h>
#include <stdint.h>

/*-------- Bytes --------*/
/*-------- Slice --------*/
/**
* An array of bytes.
*
Expand All @@ -31,23 +31,23 @@ typedef struct {
size_t len;
const uint8_t *start;
_Bool _is_alloc;
} _z_bytes_t;
} _z_slice_t;

_z_bytes_t _z_bytes_empty(void);
inline static _Bool _z_bytes_check(_z_bytes_t value) { return value.start != NULL; }
int8_t _z_bytes_init(_z_bytes_t *bs, size_t capacity);
_z_bytes_t _z_bytes_make(size_t capacity);
_z_bytes_t _z_bytes_wrap(const uint8_t *bs, size_t len);
_z_bytes_t _z_bytes_steal(_z_bytes_t *b);
_z_slice_t _z_slice_empty(void);
inline static _Bool _z_slice_check(_z_slice_t value) { return value.start != NULL; }
int8_t _z_slice_init(_z_slice_t *bs, size_t capacity);
_z_slice_t _z_slice_make(size_t capacity);
_z_slice_t _z_slice_wrap(const uint8_t *bs, size_t len);
_z_slice_t _z_slice_steal(_z_slice_t *b);

void _z_bytes_copy(_z_bytes_t *dst, const _z_bytes_t *src);
_z_bytes_t _z_bytes_duplicate(const _z_bytes_t *src);
void _z_bytes_move(_z_bytes_t *dst, _z_bytes_t *src);
void _z_bytes_reset(_z_bytes_t *bs);
_Bool _z_bytes_is_empty(const _z_bytes_t *bs);
void _z_slice_copy(_z_slice_t *dst, const _z_slice_t *src);
_z_slice_t _z_slice_duplicate(const _z_slice_t *src);
void _z_slice_move(_z_slice_t *dst, _z_slice_t *src);
void _z_slice_reset(_z_slice_t *bs);
_Bool _z_slice_is_empty(const _z_slice_t *bs);

_Bool _z_bytes_eq(const _z_bytes_t *left, const _z_bytes_t *right);
void _z_bytes_clear(_z_bytes_t *bs);
void _z_bytes_free(_z_bytes_t **bs);
_Bool _z_slice_eq(const _z_slice_t *left, const _z_slice_t *right);
void _z_slice_clear(_z_slice_t *bs);
void _z_slice_free(_z_slice_t **bs);

#endif /* ZENOH_PICO_COLLECTIONS_BYTES_H */
4 changes: 2 additions & 2 deletions include/zenoh-pico/collections/string.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ void _z_string_move_str(_z_string_t *dst, char *src);
void _z_string_clear(_z_string_t *s);
void _z_string_free(_z_string_t **s);
void _z_string_reset(_z_string_t *s);
_z_string_t _z_string_convert_bytes(const _z_bytes_t *bs);
_z_string_t _z_string_from_bytes(const _z_bytes_t *bs);
_z_string_t _z_string_convert_bytes(const _z_slice_t *bs);
_z_string_t _z_string_from_bytes(const _z_slice_t *bs);

_Z_ELEM_DEFINE(_z_string, _z_string_t, _z_string_size, _z_string_clear, _z_string_copy)

Expand Down
8 changes: 4 additions & 4 deletions include/zenoh-pico/link/link.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ typedef int8_t (*_z_f_link_listen)(struct _z_link_t *self);
typedef void (*_z_f_link_close)(struct _z_link_t *self);
typedef size_t (*_z_f_link_write)(const struct _z_link_t *self, const uint8_t *ptr, size_t len);
typedef size_t (*_z_f_link_write_all)(const struct _z_link_t *self, const uint8_t *ptr, size_t len);
typedef size_t (*_z_f_link_read)(const struct _z_link_t *self, uint8_t *ptr, size_t len, _z_bytes_t *addr);
typedef size_t (*_z_f_link_read_exact)(const struct _z_link_t *self, uint8_t *ptr, size_t len, _z_bytes_t *addr);
typedef size_t (*_z_f_link_read)(const struct _z_link_t *self, uint8_t *ptr, size_t len, _z_slice_t *addr);
typedef size_t (*_z_f_link_read_exact)(const struct _z_link_t *self, uint8_t *ptr, size_t len, _z_slice_t *addr);
typedef void (*_z_f_link_free)(struct _z_link_t *self);

typedef struct _z_link_t {
Expand Down Expand Up @@ -141,7 +141,7 @@ int8_t _z_open_link(_z_link_t *zl, const char *locator);
int8_t _z_listen_link(_z_link_t *zl, const char *locator);

int8_t _z_link_send_wbuf(const _z_link_t *zl, const _z_wbuf_t *wbf);
size_t _z_link_recv_zbuf(const _z_link_t *zl, _z_zbuf_t *zbf, _z_bytes_t *addr);
size_t _z_link_recv_exact_zbuf(const _z_link_t *zl, _z_zbuf_t *zbf, size_t len, _z_bytes_t *addr);
size_t _z_link_recv_zbuf(const _z_link_t *zl, _z_zbuf_t *zbf, _z_slice_t *addr);
size_t _z_link_recv_exact_zbuf(const _z_link_t *zl, _z_zbuf_t *zbf, size_t len, _z_slice_t *addr);

#endif /* ZENOH_PICO_LINK_H */
2 changes: 1 addition & 1 deletion include/zenoh-pico/net/encoding.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* A zenoh encoding.
*/
typedef struct _z_encoding_t {
_z_bytes_t schema;
_z_slice_t schema;
uint16_t id;
} _z_encoding_t;

Expand Down
2 changes: 1 addition & 1 deletion include/zenoh-pico/net/query.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ typedef struct {
} _z_queryable_t;

#if Z_FEATURE_QUERYABLE == 1
_z_query_t _z_query_create(const _z_value_t *value, const _z_keyexpr_t *key, const _z_bytes_t *parameters,
_z_query_t _z_query_create(const _z_value_t *value, const _z_keyexpr_t *key, const _z_slice_t *parameters,
_z_session_t *zn, uint32_t request_id, z_attachment_t att);
void _z_queryable_clear(_z_queryable_t *qbl);
void _z_queryable_free(_z_queryable_t **qbl);
Expand Down
4 changes: 2 additions & 2 deletions include/zenoh-pico/net/reply.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
*
* Members:
* _z_sample_t data: a :c:type:`_z_sample_t` containing the key and value of the reply.
* _z_bytes_t replier_id: The id of the replier that sent this reply.
* _z_slice_t replier_id: The id of the replier that sent this reply.
*
*/
typedef struct _z_reply_data_t {
Expand Down Expand Up @@ -61,7 +61,7 @@ _z_reply_t _z_reply_null(void);
void _z_reply_clear(_z_reply_t *src);
void _z_reply_free(_z_reply_t **hello);
void _z_reply_copy(_z_reply_t *dst, _z_reply_t *src);
_z_reply_t _z_reply_create(_z_keyexpr_t keyexpr, z_reply_tag_t tag, _z_id_t id, const _z_bytes_t *payload,
_z_reply_t _z_reply_create(_z_keyexpr_t keyexpr, z_reply_tag_t tag, _z_id_t id, const _z_slice_t *payload,
const _z_timestamp_t *timestamp, _z_encoding_t encoding, z_sample_kind_t kind,
z_attachment_t att);

Expand Down
6 changes: 3 additions & 3 deletions include/zenoh-pico/net/sample.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
*
* Members:
* _z_keyexpr_t key: The resource key of this data sample.
* _z_bytes_t value: The value of this data sample.
* _z_slice_t value: The value of this data sample.
* _z_encoding_t encoding: The encoding for the value of this data sample.
*/
typedef struct _z_sample_t {
_z_keyexpr_t keyexpr;
_z_bytes_t payload;
_z_slice_t payload;
_z_timestamp_t timestamp;
_z_encoding_t encoding;
z_sample_kind_t kind;
Expand Down Expand Up @@ -58,7 +58,7 @@ void _z_sample_free(_z_sample_t **sample);
void _z_sample_copy(_z_sample_t *dst, const _z_sample_t *src);
_z_sample_t _z_sample_duplicate(const _z_sample_t *src);

_z_sample_t _z_sample_create(const _z_keyexpr_t *key, const _z_bytes_t *payload, _z_timestamp_t timestamp,
_z_sample_t _z_sample_create(const _z_keyexpr_t *key, const _z_slice_t *payload, _z_timestamp_t timestamp,
const _z_encoding_t encoding, const z_sample_kind_t kind, const _z_qos_t qos,
const z_attachment_t att);

Expand Down
12 changes: 6 additions & 6 deletions include/zenoh-pico/protocol/codec/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ int8_t _z_zint32_decode(uint32_t *zint, _z_zbuf_t *buf);
int8_t _z_zint64_decode(uint64_t *zint, _z_zbuf_t *buf);
int8_t _z_zsize_decode(_z_zint_t *zint, _z_zbuf_t *buf);

int8_t _z_bytes_val_encode(_z_wbuf_t *buf, const _z_bytes_t *bs);
int8_t _z_bytes_val_decode(_z_bytes_t *bs, _z_zbuf_t *buf);
int8_t _z_bytes_val_decode_na(_z_bytes_t *bs, _z_zbuf_t *zbf);
int8_t _z_slice_val_encode(_z_wbuf_t *buf, const _z_slice_t *bs);
int8_t _z_slice_val_decode(_z_slice_t *bs, _z_zbuf_t *buf);
int8_t _z_slice_val_decode_na(_z_slice_t *bs, _z_zbuf_t *zbf);

int8_t _z_bytes_encode(_z_wbuf_t *buf, const _z_bytes_t *bs);
size_t _z_bytes_encode_len(const _z_bytes_t *bs);
int8_t _z_bytes_decode(_z_bytes_t *bs, _z_zbuf_t *buf);
int8_t _z_slice_encode(_z_wbuf_t *buf, const _z_slice_t *bs);
size_t _z_slice_encode_len(const _z_slice_t *bs);
int8_t _z_slice_decode(_z_slice_t *bs, _z_zbuf_t *buf);
int8_t _z_zbuf_read_exact(_z_zbuf_t *zbf, uint8_t *dest, size_t length);

int8_t _z_str_encode(_z_wbuf_t *buf, const char *s);
Expand Down
12 changes: 6 additions & 6 deletions include/zenoh-pico/protocol/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ typedef struct {
* Returning `0` is treated as `continue`.
* Returning any other value is treated as `break`.
*/
typedef int8_t (*z_attachment_iter_body_t)(_z_bytes_t key, _z_bytes_t value, void *context);
typedef int8_t (*z_attachment_iter_body_t)(_z_slice_t key, _z_slice_t value, void *context);
/**
* The driver of a loop over an attachment's key-value pairs.
*
Expand Down Expand Up @@ -106,7 +106,7 @@ typedef struct z_attachment_t {
typedef struct {
union {
z_attachment_t decoded;
_z_bytes_t encoded;
_z_slice_t encoded;
} body;
_Bool is_encoded;
} _z_owned_encoded_attachment_t;
Expand All @@ -118,7 +118,7 @@ z_attachment_t _z_encoded_as_attachment(const _z_owned_encoded_attachment_t *att

_Bool z_attachment_check(const z_attachment_t *attachment);
int8_t z_attachment_iterate(z_attachment_t this_, z_attachment_iter_body_t body, void *ctx);
_z_bytes_t z_attachment_get(z_attachment_t this_, _z_bytes_t key);
_z_slice_t z_attachment_get(z_attachment_t this_, _z_slice_t key);

/**
* Estimate the length of an attachment once encoded.
Expand Down Expand Up @@ -224,10 +224,10 @@ typedef struct {
*
* Members:
* _z_encoding_t encoding: The encoding of the `payload`.
* _z_bytes_t payload: The payload of this zenoh value.
* _z_slice_t payload: The payload of this zenoh value.
*/
typedef struct {
_z_bytes_t payload;
_z_slice_t payload;
_z_encoding_t encoding;
} _z_value_t;
_z_value_t _z_value_null(void);
Expand All @@ -240,7 +240,7 @@ void _z_value_free(_z_value_t **hello);
* A hello message returned by a zenoh entity to a scout message sent with :c:func:`_z_scout`.
*
* Members:
* _z_bytes_t zid: The Zenoh ID of the scouted entity (empty if absent).
* _z_slice_t zid: The Zenoh ID of the scouted entity (empty if absent).
* _z_string_vec_t locators: The locators of the scouted entity.
* z_whatami_t whatami: The kind of zenoh entity.
*/
Expand Down
6 changes: 3 additions & 3 deletions include/zenoh-pico/protocol/definitions/message.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
typedef struct {
_z_encoding_t encoding;
_z_source_info_t _ext_source_info;
_z_bytes_t _payload;
_z_slice_t _payload;
} _z_msg_err_t;
void _z_msg_err_clear(_z_msg_err_t *err);

Expand All @@ -73,7 +73,7 @@ static inline void _z_msg_del_clear(_z_msg_del_t *del) { (void)del; }

typedef struct {
_z_m_push_commons_t _commons;
_z_bytes_t _payload;
_z_slice_t _payload;
_z_encoding_t _encoding;
#if Z_FEATURE_ATTACHMENT == 1
_z_owned_encoded_attachment_t _attachment;
Expand All @@ -98,7 +98,7 @@ void _z_msg_put_clear(_z_msg_put_t *);
#define _Z_FLAG_Z_Q_C 0x20 // 1 << 5 | Consolidation if C==1 then consolidation is present
#define _Z_FLAG_Z_Q_P 0x40 // 1 << 6 | Params if P==1 then parameters are present
typedef struct {
_z_bytes_t _parameters;
_z_slice_t _parameters;
_z_source_info_t _ext_info;
_z_value_t _ext_value;
z_consolidation_mode_t _consolidation;
Expand Down
2 changes: 1 addition & 1 deletion include/zenoh-pico/protocol/definitions/network.h
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ _Z_ELEM_DEFINE(_z_network_message, _z_network_message_t, _z_noop_size, _z_n_msg_
_Z_VEC_DEFINE(_z_network_message, _z_network_message_t)

void _z_msg_fix_mapping(_z_zenoh_message_t *msg, uint16_t mapping);
_z_network_message_t _z_msg_make_query(_Z_MOVE(_z_keyexpr_t) key, _Z_MOVE(_z_bytes_t) parameters, _z_zint_t qid,
_z_network_message_t _z_msg_make_query(_Z_MOVE(_z_keyexpr_t) key, _Z_MOVE(_z_slice_t) parameters, _z_zint_t qid,
z_consolidation_mode_t consolidation, _Z_MOVE(_z_value_t) value,
uint32_t timeout_ms
#if Z_FEATURE_ATTACHMENT == 1
Expand Down
12 changes: 6 additions & 6 deletions include/zenoh-pico/protocol/definitions/transport.h
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ void _z_t_msg_join_clear(_z_t_msg_join_t *msg);
//
typedef struct {
_z_id_t _zid;
_z_bytes_t _cookie;
_z_slice_t _cookie;
uint16_t _batch_size;
z_whatami_t _whatami;
uint8_t _req_id_res;
Expand Down Expand Up @@ -348,7 +348,7 @@ void _z_t_msg_init_clear(_z_t_msg_init_t *msg);
typedef struct {
_z_zint_t _lease;
_z_zint_t _initial_sn;
_z_bytes_t _cookie;
_z_slice_t _cookie;
} _z_t_msg_open_t;
void _z_t_msg_open_clear(_z_t_msg_open_t *msg);

Expand Down Expand Up @@ -472,7 +472,7 @@ void _z_t_msg_frame_clear(_z_t_msg_frame_t *msg);
// +---------------+
//
typedef struct {
_z_bytes_t _payload;
_z_slice_t _payload;
_z_zint_t _sn;
} _z_t_msg_fragment_t;
void _z_t_msg_fragment_clear(_z_t_msg_fragment_t *msg);
Expand Down Expand Up @@ -500,15 +500,15 @@ void _z_t_msg_clear(_z_transport_message_t *msg);
_z_transport_message_t _z_t_msg_make_join(z_whatami_t whatami, _z_zint_t lease, _z_id_t zid,
_z_conduit_sn_list_t next_sn);
_z_transport_message_t _z_t_msg_make_init_syn(z_whatami_t whatami, _z_id_t zid);
_z_transport_message_t _z_t_msg_make_init_ack(z_whatami_t whatami, _z_id_t zid, _z_bytes_t cookie);
_z_transport_message_t _z_t_msg_make_open_syn(_z_zint_t lease, _z_zint_t initial_sn, _z_bytes_t cookie);
_z_transport_message_t _z_t_msg_make_init_ack(z_whatami_t whatami, _z_id_t zid, _z_slice_t cookie);
_z_transport_message_t _z_t_msg_make_open_syn(_z_zint_t lease, _z_zint_t initial_sn, _z_slice_t cookie);
_z_transport_message_t _z_t_msg_make_open_ack(_z_zint_t lease, _z_zint_t initial_sn);
_z_transport_message_t _z_t_msg_make_close(uint8_t reason, _Bool link_only);
_z_transport_message_t _z_t_msg_make_keep_alive(void);
_z_transport_message_t _z_t_msg_make_frame(_z_zint_t sn, _z_network_message_vec_t messages, _Bool is_reliable);
_z_transport_message_t _z_t_msg_make_frame_header(_z_zint_t sn, _Bool is_reliable);
_z_transport_message_t _z_t_msg_make_fragment_header(_z_zint_t sn, _Bool is_reliable, _Bool is_last);
_z_transport_message_t _z_t_msg_make_fragment(_z_zint_t sn, _z_bytes_t messages, _Bool is_reliable, _Bool is_last);
_z_transport_message_t _z_t_msg_make_fragment(_z_zint_t sn, _z_slice_t messages, _Bool is_reliable, _Bool is_last);

/*------------------ Copy ------------------*/
void _z_t_msg_copy(_z_transport_message_t *clone, _z_transport_message_t *msg);
Expand Down
4 changes: 2 additions & 2 deletions include/zenoh-pico/protocol/ext.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ void _z_msg_ext_clear_zint(_z_msg_ext_zint_t *ext);

/*------------------ Unknown Extension ------------------*/
typedef struct {
_z_bytes_t _val;
_z_slice_t _val;
} _z_msg_ext_zbuf_t;
void _z_msg_ext_clear_zbuf(_z_msg_ext_zbuf_t *ext);

Expand All @@ -88,7 +88,7 @@ void _z_msg_ext_clear(_z_msg_ext_t *ext);
/*------------------ Builders ------------------*/
_z_msg_ext_t _z_msg_ext_make_unit(uint8_t id);
_z_msg_ext_t _z_msg_ext_make_zint(uint8_t id, _z_zint_t zid);
_z_msg_ext_t _z_msg_ext_make_zbuf(uint8_t id, _z_bytes_t zbuf);
_z_msg_ext_t _z_msg_ext_make_zbuf(uint8_t id, _z_slice_t zbuf);

/*------------------ Copy ------------------*/
void _z_msg_ext_copy(_z_msg_ext_t *clone, const _z_msg_ext_t *ext);
Expand Down
4 changes: 2 additions & 2 deletions include/zenoh-pico/protocol/iobuf.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ void _z_iosli_write_bytes(_z_iosli_t *ios, const uint8_t *bs, size_t offset, siz
void _z_iosli_put(_z_iosli_t *ios, uint8_t b, size_t pos);
void _z_iosli_reset(_z_iosli_t *ios);

_z_bytes_t _z_iosli_to_bytes(const _z_iosli_t *ios);
_z_slice_t _z_iosli_to_bytes(const _z_iosli_t *ios);

size_t _z_iosli_size(const _z_iosli_t *ios);
void _z_iosli_clear(_z_iosli_t *ios);
Expand All @@ -67,7 +67,7 @@ typedef struct {
_z_zbuf_t _z_zbuf_make(size_t capacity);
_z_zbuf_t _z_zbuf_view(_z_zbuf_t *zbf, size_t length);
/// Constructs a _borrowing_ reader on `slice`
_z_zbuf_t _z_zbytes_as_zbuf(_z_bytes_t slice);
_z_zbuf_t _z_slice_as_zbuf(_z_slice_t slice);

size_t _z_zbuf_capacity(const _z_zbuf_t *zbf);
uint8_t const *_z_zbuf_start(const _z_zbuf_t *zbf);
Expand Down
2 changes: 1 addition & 1 deletion include/zenoh-pico/session/subscription.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ _z_subscription_rc_t *_z_get_subscription_by_id(_z_session_t *zn, uint8_t is_loc
_z_subscription_rc_list_t *_z_get_subscriptions_by_key(_z_session_t *zn, uint8_t is_local, const _z_keyexpr_t *keyexpr);

_z_subscription_rc_t *_z_register_subscription(_z_session_t *zn, uint8_t is_local, _z_subscription_t *sub);
int8_t _z_trigger_subscriptions(_z_session_t *zn, const _z_keyexpr_t keyexpr, const _z_bytes_t payload,
int8_t _z_trigger_subscriptions(_z_session_t *zn, const _z_keyexpr_t keyexpr, const _z_slice_t payload,
const _z_encoding_t encoding, const _z_zint_t kind, const _z_timestamp_t timestamp,
const _z_n_qos_t qos, const z_attachment_t att);
void _z_unregister_subscription(_z_session_t *zn, uint8_t is_local, _z_subscription_rc_t *sub);
Expand Down
2 changes: 1 addition & 1 deletion include/zenoh-pico/system/link/raweth.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ typedef struct {

int8_t _z_open_raweth(_z_sys_net_socket_t *sock, const char *interface);
size_t _z_send_raweth(const _z_sys_net_socket_t *sock, const void *buff, size_t buff_len);
size_t _z_receive_raweth(const _z_sys_net_socket_t *sock, void *buff, size_t buff_len, _z_bytes_t *addr,
size_t _z_receive_raweth(const _z_sys_net_socket_t *sock, void *buff, size_t buff_len, _z_slice_t *addr,
const _zp_raweth_whitelist_array_t *whitelist);
int8_t _z_close_raweth(_z_sys_net_socket_t *sock);
size_t _z_raweth_ntohs(size_t val);
Expand Down
4 changes: 2 additions & 2 deletions include/zenoh-pico/system/link/udp.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ int8_t _z_listen_udp_multicast(_z_sys_net_socket_t *sock, const _z_sys_net_endpo
void _z_close_udp_multicast(_z_sys_net_socket_t *sockrecv, _z_sys_net_socket_t *socksend,
const _z_sys_net_endpoint_t rep, const _z_sys_net_endpoint_t lep);
size_t _z_read_exact_udp_multicast(const _z_sys_net_socket_t sock, uint8_t *ptr, size_t len,
const _z_sys_net_endpoint_t lep, _z_bytes_t *ep);
const _z_sys_net_endpoint_t lep, _z_slice_t *ep);
size_t _z_read_udp_multicast(const _z_sys_net_socket_t sock, uint8_t *ptr, size_t len, const _z_sys_net_endpoint_t lep,
_z_bytes_t *ep);
_z_slice_t *ep);
size_t _z_send_udp_multicast(const _z_sys_net_socket_t sock, const uint8_t *ptr, size_t len,
const _z_sys_net_endpoint_t rep);
#endif
Expand Down
Loading

0 comments on commit ffd898d

Please sign in to comment.