MINOR: arg: Add support for ARGT_PBUF_FNUM arg type.

This new argument type is used to parse Protocol Buffers field number
with dotted notation (e.g: 1.2.3.4).
diff --git a/include/types/arg.h b/include/types/arg.h
index 96974ba..6580c15 100644
--- a/include/types/arg.h
+++ b/include/types/arg.h
@@ -29,6 +29,7 @@
 #include <common/mini-clist.h>
 
 #include <types/vars.h>
+#include <types/protocol_buffers.h>
 
 /* encoding of each arg type : up to 31 types are supported */
 #define ARGT_BITS      5
@@ -60,6 +61,7 @@
 	ARGT_MAP,      /* a pointer to a map descriptor */
 	ARGT_REG,      /* a pointer to a regex */
 	ARGT_VAR,      /* contains a variable description. */
+	ARGT_PBUF_FNUM, /* a protocol buffer field number */
 	/* please update arg_type_names[] in args.c if you add entries here */
 };
 
@@ -100,6 +102,7 @@
 	struct userlist *usr;
 	struct map_descriptor *map;
 	struct my_regex *reg;
+	struct pbuf_fid fid;
 	struct var_desc var;
 };
 
diff --git a/include/types/protocol_buffers.h b/include/types/protocol_buffers.h
new file mode 100644
index 0000000..af5d262
--- /dev/null
+++ b/include/types/protocol_buffers.h
@@ -0,0 +1,37 @@
+/*
+ * include/types/protocol_buffers.h
+ * This file contains structure declarations for protocol buffers.
+ *
+ * Copyright 2012 Willy Tarreau <w@1wt.eu>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation, version 2.1
+ * exclusively.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef _TYPES_PROTOCOL_BUFFERS_H
+#define _TYPES_PROTOCOL_BUFFERS_H
+
+struct pbuf_fid {
+	unsigned int *ids;
+	size_t sz;
+};
+
+#endif /* _TYPES_PROTOCOL_BUFFERS_H */
+
+/*
+ * Local variables:
+ *  c-indent-level: 8
+ *  c-basic-offset: 8
+ * End:
+ */
diff --git a/src/arg.c b/src/arg.c
index 8e71dcc..858f8ec 100644
--- a/src/arg.c
+++ b/src/arg.c
@@ -35,6 +35,7 @@
 	[ARGT_MAP]  = "map",
 	[ARGT_REG]  = "regex",
 	[ARGT_VAR]  = "variable",
+	[ARGT_PBUF_FNUM] = "Protocol buffers field number",
 	/* Unassigned types must never happen. Better crash during parsing if they do. */
 };
 
@@ -239,6 +240,12 @@
 			arg->type = ARGT_SINT;
 			break;
 
+		case ARGT_PBUF_FNUM:
+			if (!parse_dotted_uints(word, &arg->data.fid.ids, &arg->data.fid.sz))
+				goto parse_err;
+
+			break;
+
 			/* FIXME: other types need to be implemented here */
 		default:
 			goto not_impl;