MINOR: protocols: register the ->add function and stop calling them directly
cfgparse has no business directly calling each individual protocol's 'add'
function to create a listener. Now that they're all registered, better
perform a protocol lookup on the family and have a standard ->add method
for all of them.
diff --git a/include/types/protocol.h b/include/types/protocol.h
index 6a4986f..9480c18 100644
--- a/include/types/protocol.h
+++ b/include/types/protocol.h
@@ -61,6 +61,7 @@
int (*get_dst)(int fd, struct sockaddr *, socklen_t, int dir); /* syscall used to retrieve dst addr */
int (*drain)(int fd); /* indicates whether we can safely close the fd */
int (*pause)(struct listener *l); /* temporarily pause this listener for a soft restart */
+ void (*add)(struct listener *l, int port); /* add a listener for this protocol and port */
struct list listeners; /* list of listeners using this protocol */
int nb_listeners; /* number of listeners */