typedef struct
{
uint16_t index;
- /* memif conenction handle */
+ /* memif connection handle */
memif_conn_handle_t conn;
/* interface ip address */
uint8_t ip_addr[4];
DBG ("epoll_ctl: %s fd %d", strerror (errno), fd);
return -1;
}
- DBG ("fd %d moddified on epoll", fd);
+ DBG ("fd %d modified on epoll", fd);
return 0;
}
memif_connection_t *c = &memif_connection[index];
int i, ti;
INFO ("memif disconnected!");
- /* inform thread in polling mode about memif disconenction */
+ /* inform thread in polling mode about memif disconnection */
c->pending_del = 1;
for (i = 0; i < MAX_QUEUES; i++)
{
/* user needs to watch new fd or stop watching fd that is about to be closed.
control fd will be modified during connection establishment to minimize CPU usage */
int
-control_fd_update (int fd, uint8_t events)
+control_fd_update (int fd, uint8_t events, void *ctx)
{
/* convert memif event definitions to epoll events */
if (events & MEMIF_FD_EVENT_DEL)
memif_connection_t *c = &memif_connection[index];
int err;
- /* disconenct then delete memif connection */
+ /* disconnect then delete memif connection */
err = memif_delete (&c->conn);
if (err != MEMIF_ERR_SUCCESS)
INFO ("memif_delete: %s", memif_strerror (err));
if (evt.data.fd > 2)
{
/* event of memif control fd */
- /* convert epolle events to memif events */
+ /* convert epoll events to memif events */
if (evt.events & EPOLLIN)
events |= MEMIF_FD_EVENT_READ;
if (evt.events & EPOLLOUT)