aboutgitcodebugslistschat
path: root/udp.h
diff options
context:
space:
mode:
Diffstat (limited to 'udp.h')
-rw-r--r--udp.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/udp.h b/udp.h
index b9ac2e0..201714a 100644
--- a/udp.h
+++ b/udp.h
@@ -1,19 +1,25 @@
#ifndef UDP_H
#define UDP_H
-void udp_sock_handler(struct ctx *c, int s, uint32_t events);
+#define UDP_TIMER_INTERVAL 1000 /* ms */
+
+void udp_sock_handler(struct ctx *c, int s, uint32_t events,
+ struct timespec *now);
int udp_tap_handler(struct ctx *c, int af, void *addr,
- struct tap_msg *msg, int count);
+ struct tap_msg *msg, int count, struct timespec *now);
int udp_sock_init(struct ctx *c);
+void udp_timer(struct ctx *c, struct timespec *ts);
/**
* struct udp_ctx - Execution context for UDP
* @fd_min: Lowest file descriptor number for UDP ever used
* @fd_max: Highest file descriptor number for UDP ever used
+ * @timer_run: Timestamp of most recent timer run
*/
struct udp_ctx {
int fd_min;
int fd_max;
+ struct timespec timer_run;
};
#endif /* UDP_H */