• Main Page
  • Modules
  • Data Structures
  • Files
  • File List

snprintf.c

00001 /*
00002  * (C) 2006-2007 by Pablo Neira Ayuso <pablo@netfilter.org>
00003  *
00004  * This software may be used and distributed according to the terms
00005  * of the GNU General Public License, incorporated herein by reference.
00006  */
00007 
00008 #include "internal/internal.h"
00009 
00010 int __snprintf_expect(char *buf,
00011                       unsigned int len,
00012                       const struct nf_expect *exp,
00013                       unsigned int type,
00014                       unsigned int msg_output,
00015                       unsigned int flags)
00016 {
00017         int size;
00018 
00019         switch(msg_output) {
00020         case NFCT_O_DEFAULT:
00021                 size = __snprintf_expect_default(buf, len, exp, type, flags);
00022                 break;
00023         default:
00024                 errno = ENOENT;
00025                 return -1;
00026         }
00027 
00028         /* NULL terminated string */
00029         buf[size+1 > len ? len-1 : size] = '\0';
00030 
00031         return size;
00032 }

Generated on Wed Jan 26 2011 23:11:37 for libnetfilter_conntrack by  doxygen 1.7.1