comparison listener.h @ 1478:3a933956437e coverity

update coverity
author Matt Johnston <matt@ucc.asn.au>
date Fri, 09 Feb 2018 23:49:22 +0800
parents 58a74cb829b8
children
comparison
equal deleted inserted replaced
1439:8d24733026c5 1478:3a933956437e
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