From f8138d1f91c913166bffb0077a0fe06831a77ecf Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Thu, 11 Jan 2007 23:26:13 +0000 Subject: fakeinetd: attempted ipv6-ization (and it's done) but entire applet can be orders of magnitude smaller if written as an inetd service. So did that (#ifdef'ed out entire old version). inetd version is less than 10% of old one! function old new delta packed_usage 22083 22105 +22 nobodystr 4 - -4 bind_ip_address 4 - -4 ident_substr 20 - -20 chmatch 22 - -22 movefd 25 - -25 skipchars 49 - -49 handlexitsigs 51 - -51 replyError 70 - -70 .rodata 158120 158024 -96 deleteConn 102 - -102 G 524 388 -136 conns 560 - -560 fakeidentd_main 1457 143 -1314 ------------------------------------------------------------------------------ (add/remove: 0/10 grow/shrink: 1/3 up/down: 22/-2453) Total: -2431 bytes --- include/usage.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/usage.h') diff --git a/include/usage.h b/include/usage.h index 14650e5..4e52065 100644 --- a/include/usage.h +++ b/include/usage.h @@ -826,6 +826,7 @@ "\\( and \\) or null; if \\( and \\) are not used, they return the number\n" \ "of characters matched or 0." +#if 0 /* bloaty */ #define fakeidentd_trivial_usage \ "[-b ip] [STRING]" #define fakeidentd_full_usage \ @@ -833,6 +834,14 @@ "\n\nOptions:\n" \ " -b Bind to ip address\n" \ " STRING The ident answer string (default is nobody)" +#else /* inetd-only */ +#define fakeidentd_trivial_usage \ + "[username]" +#define fakeidentd_full_usage \ + "Return a (faked) ident response.\n" \ + "This applet is meant to run from inetd.\n" \ + "Optional argument is the username to return (default is 'nobody')." +#endif #define false_trivial_usage \ "" -- cgit v1.1