comparison listener.h @ 1511:5916af64acd4 fuzz

merge from main
author Matt Johnston <matt@ucc.asn.au>
date Sat, 17 Feb 2018 19:29:51 +0800
parents 58a74cb829b8
children
comparison
equal deleted inserted replaced
1457:32f990cc96b1 1511:5916af64acd4
33 int socks[DROPBEAR_MAX_SOCKS]; 33 int socks[DROPBEAR_MAX_SOCKS];
34 unsigned int nsocks; 34 unsigned int nsocks;
35 35
36 int index; /* index in the array of listeners */ 36 int index; /* index in the array of listeners */
37 37
38 void (*acceptor)(struct Listener*, int sock); 38 void (*acceptor)(const struct Listener*, int sock);
39 void (*cleanup)(struct Listener*); 39 void (*cleanup)(const struct Listener*);
40 40
41 int type; /* CHANNEL_ID_X11, CHANNEL_ID_AGENT, 41 int type; /* CHANNEL_ID_X11, CHANNEL_ID_AGENT,
42 CHANNEL_ID_TCPDIRECT (for clients), 42 CHANNEL_ID_TCPDIRECT (for clients),
43 CHANNEL_ID_TCPFORWARDED (for servers) */ 43 CHANNEL_ID_TCPFORWARDED (for servers) */
44 44
45 void *typedata; 45 void *typedata;
46 46
47 }; 47 };
48 48
49 void listeners_initialise(void); 49 void listeners_initialise(void);
50 void handle_listeners(fd_set * readfds); 50 void handle_listeners(const fd_set * readfds);
51 void set_listener_fds(fd_set * readfds); 51 void set_listener_fds(fd_set * readfds);
52 52
53 struct Listener* new_listener(int socks[], unsigned int nsocks, 53 struct Listener* new_listener(const int socks[], unsigned int nsocks,
54 int type, void* typedata, 54 int type, void* typedata,
55 void (*acceptor)(struct Listener* listener, int sock), 55 void (*acceptor)(const struct Listener* listener, int sock),
56 void (*cleanup)(struct Listener*)); 56 void (*cleanup)(const struct Listener*));
57 57
58 struct Listener * get_listener(int type, void* typedata, 58 struct Listener * get_listener(int type, const void* typedata,
59 int (*match)(void*, void*)); 59 int (*match)(const void*, const void*));
60 60
61 void remove_listener(struct Listener* listener); 61 void remove_listener(struct Listener* listener);
62 62
63 void remove_all_listeners(void); 63 void remove_all_listeners(void);
64 64