From: <li...@us...> - 2004-02-08 17:06:19
|
Update of /cvsroot/iptables-p2p/iptables-p2p/iptables In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23425 Modified Files: libipt_p2p.c Log Message: Show available protocols in help Index: libipt_p2p.c =================================================================== RCS file: /cvsroot/iptables-p2p/iptables-p2p/iptables/libipt_p2p.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- libipt_p2p.c 8 Feb 2004 16:47:29 -0000 1.12 +++ libipt_p2p.c 8 Feb 2004 17:02:56 -0000 1.13 @@ -94,12 +94,20 @@ /* Prints usage. */ static void help(void) { + int i; + printf( "P2P match v%s options:\n" " --p2p-protocol [!] protocol[,proto2][,proto3...]\n" " --p2p ...\n" " match application-layer protocol\n", IPT_P2P_VERSION); + + printf("Valid p2p protocols:\n"); + for (i = 0; i < PROTOMAP_NELEM; i++) + if(IPT_P2P_PROTO_ALL != protomap[i].proto) + printf(" %s\n", protomap[i].name); + } /* Initialize the match. */ |