From afe966b64418c01e7ea09bb31c720365b0c4f395 Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Sun, 22 Jul 2007 16:17:26 +0000 Subject: some subnet stats... still ugly and untested. --- opentracker.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'opentracker.c') diff --git a/opentracker.c b/opentracker.c index b13dc11..ff1c1c6 100644 --- a/opentracker.c +++ b/opentracker.c @@ -274,6 +274,8 @@ static void httpresponse( const int64 s, char *data ) { mode = STATS_TCP; else if( !byte_diff(data,4,"udp4")) mode = STATS_UDP; + else if( !byte_diff(data,4,"s24s")) + mode = STATS_SLASH24S; else HTTPERROR_400_PARAM; } @@ -304,6 +306,9 @@ static void httpresponse( const int64 s, char *data ) { /* Enough for http header + whole scrape string */ if( !( reply_size = return_stats_for_tracker( SUCCESS_HTTP_HEADER_LENGTH + static_outbuf, mode ) ) ) HTTPERROR_500; break; + case STATS_SLASH24S: + if( !( reply_size = return_stats_for_slash24s( SUCCESS_HTTP_HEADER_LENGTH + static_outbuf, 25, 64 ) ) ) HTTPERROR_500; + break; } break; -- cgit v1.2.3