diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-11-18 18:40:14 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-11-18 18:40:14 +0100 |
commit | 48ac0ffecdf244d04ed6cb4f4c560aeea5ba7f23 (patch) | |
tree | 05b6563cbb3321d725f7c671ce3e27d81807f93e /runtime/nsdpoll_ptcp.h | |
parent | c82f2781d2ed372e918ea5b5529ead57ff95fc2a (diff) | |
download | rsyslog-48ac0ffecdf244d04ed6cb4f4c560aeea5ba7f23.tar.gz rsyslog-48ac0ffecdf244d04ed6cb4f4c560aeea5ba7f23.tar.xz rsyslog-48ac0ffecdf244d04ed6cb4f4c560aeea5ba7f23.zip |
milestone commit: first driver layer call done
... does not really run. We can now call into the epoll driver, but
not handle epoll(). The driver also needs more modifications.
Diffstat (limited to 'runtime/nsdpoll_ptcp.h')
-rw-r--r-- | runtime/nsdpoll_ptcp.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/runtime/nsdpoll_ptcp.h b/runtime/nsdpoll_ptcp.h index 36d39da7..ccdb87f0 100644 --- a/runtime/nsdpoll_ptcp.h +++ b/runtime/nsdpoll_ptcp.h @@ -26,10 +26,24 @@ #include "nsd.h" typedef nsdpoll_if_t nsdpoll_ptcp_if_t; /* we just *implement* this interface */ +/* a helper object to keep track of the epoll event records + * Note that we need to keep track of that list because we need to + * free the events when they are no longer needed. + */ +typedef struct nsdpoll_epollevt_lst_s nsdpoll_epollevt_lst_t; +struct nsdpoll_epollevt_lst_s { + epoll_event_t event; + int id; + void *pUsr; + nsd_ptcp_t *pSock; /* our associated netstream driver data */ + nsdpoll_epollevt_lst_t *pNext; +}; /* the nsdpoll_ptcp object */ struct nsdpoll_ptcp_s { BEGINobjInstance; /* Data to implement generic object - MUST be the first data element! */ + int efd; /* file descriptor used by epoll */ + nsdpoll_epollevt_lst_t *pRoot; /* Root of the epoll event list */ }; /* interface is defined in nsd.h, we just implement it! */ |