aboutsummaryrefslogtreecommitdiff
path: root/util/netevent.h
diff options
context:
space:
mode:
Diffstat (limited to 'util/netevent.h')
-rw-r--r--util/netevent.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/util/netevent.h b/util/netevent.h
index 4a2aa1677c02..c79f99b3eb6d 100644
--- a/util/netevent.h
+++ b/util/netevent.h
@@ -70,6 +70,7 @@ struct comm_point;
struct comm_reply;
struct tcl_list;
struct ub_event_base;
+struct unbound_socket;
struct mesh_state;
struct mesh_area;
@@ -169,6 +170,8 @@ struct comm_point {
/** if the event is added or not */
int event_added;
+ struct unbound_socket* socket;
+
/** file descriptor for communication point */
int fd;
@@ -495,12 +498,13 @@ struct ub_event_base* comm_base_internal(struct comm_base* b);
* @param buffer: shared buffer by UDP sockets from this thread.
* @param callback: callback function pointer.
* @param callback_arg: will be passed to your callback function.
+ * @param socket: and opened socket properties will be passed to your callback function.
* @return: returns the allocated communication point. NULL on error.
* Sets timeout to NULL. Turns off TCP options.
*/
struct comm_point* comm_point_create_udp(struct comm_base* base,
int fd, struct sldns_buffer* buffer,
- comm_point_callback_type* callback, void* callback_arg);
+ comm_point_callback_type* callback, void* callback_arg, struct unbound_socket* socket);
/**
* Create an UDP with ancillary data comm point. Calls malloc.
@@ -511,12 +515,13 @@ struct comm_point* comm_point_create_udp(struct comm_base* base,
* @param buffer: shared buffer by UDP sockets from this thread.
* @param callback: callback function pointer.
* @param callback_arg: will be passed to your callback function.
+ * @param socket: and opened socket properties will be passed to your callback function.
* @return: returns the allocated communication point. NULL on error.
* Sets timeout to NULL. Turns off TCP options.
*/
struct comm_point* comm_point_create_udp_ancil(struct comm_base* base,
int fd, struct sldns_buffer* buffer,
- comm_point_callback_type* callback, void* callback_arg);
+ comm_point_callback_type* callback, void* callback_arg, struct unbound_socket* socket);
/**
* Create a TCP listener comm point. Calls malloc.
@@ -539,6 +544,7 @@ struct comm_point* comm_point_create_udp_ancil(struct comm_base* base,
* to select handler type to use.
* @param callback: callback function pointer for TCP handlers.
* @param callback_arg: will be passed to your callback function.
+ * @param socket: and opened socket properties will be passed to your callback function.
* @return: returns the TCP listener commpoint. You can find the
* TCP handlers in the array inside the listener commpoint.
* returns NULL on error.
@@ -550,7 +556,7 @@ struct comm_point* comm_point_create_tcp(struct comm_base* base,
struct tcl_list* tcp_conn_limit,
size_t bufsize, struct sldns_buffer* spoolbuf,
enum listen_type port_type,
- comm_point_callback_type* callback, void* callback_arg);
+ comm_point_callback_type* callback, void* callback_arg, struct unbound_socket* socket);
/**
* Create an outgoing TCP commpoint. No file descriptor is opened, left at -1.