* @return
*/
ssize_t fwp_endpoint_do_send(struct fwp_endpoint *ep,
- void *data, const size_t size)
+ const void *data, const size_t size)
{
struct iovec iov;
struct msghdr msg = {0};
ssize_t ret;
char cmsg_buf[CMSG_SPACE(sizeof(struct in_pktinfo))];
- iov.iov_base = data;
+ iov.iov_base = (void*)data;
iov.iov_len = size;
msg.msg_iov = &iov;
* On error, -1 is returned and errno is set appropriately.
*
*/
-int fwp_send_async(struct fwp_endpoint *ep, void *msg, size_t size)
+int fwp_send_async(struct fwp_endpoint *ep, const void *msg, size_t size)
{
int ret;
return ret;
}
-int fwp_send_sync(struct fwp_endpoint *ep, void *msg, size_t size)
+int fwp_send_sync(struct fwp_endpoint *ep, const void *msg, size_t size)
{
int ret;
ssize_t fwp_recv(struct fwp_endpoint *ep,
void *buffer, const size_t buffer_size,
unsigned int *from, int flags);
-int fwp_send_sync(struct fwp_endpoint *ep, void *msg, const size_t size);
-int fwp_send_async(struct fwp_endpoint *ep, void *msg, const size_t size);
+int fwp_send_sync(struct fwp_endpoint *ep, const void *msg, const size_t size);
+int fwp_send_async(struct fwp_endpoint *ep, const void *msg, const size_t size);
ssize_t fwp_endpoint_do_send(struct fwp_endpoint *ep,
- void *data, const size_t size);
+ const void *data, const size_t size);
int fwp_endpoint_attr_init(fwp_endpoint_attr_t *attr);
static inline int fwp_endpoint_attr_setreliability(fwp_endpoint_attr_t *attr,
return ret;
}
-int fwp_vres_enqueue(struct fwp_vres *vres, struct fwp_endpoint *ep, void *msg, size_t size)
+int fwp_vres_enqueue(struct fwp_vres *vres, struct fwp_endpoint *ep,
+ const void *msg, size_t size)
{
struct fwp_msgb *msgb;
int ret;
int fwp_vres_consume_budget(struct fwp_vres *vres, size_t size, bool can_block);
struct fwp_endpoint;
-int fwp_vres_enqueue(struct fwp_vres *vres, struct fwp_endpoint *ep, void *msg, size_t size);
+int fwp_vres_enqueue(struct fwp_vres *vres, struct fwp_endpoint *ep,
+ const void *msg, size_t size);
int fwp_vres_bind(fwp_vres_t *vres, struct fwp_endpoint *ep, int sockd);
int fwp_vres_unbind(fwp_vres_t *vres);