2#ifndef CLICK_CONFPARSE_HH
3#define CLICK_CONFPARSE_HH
20# define CP_VA_PARSE_ARGS_REST const Element*, ErrorHandler*, ...
21# define CP_OPT_CONTEXT , const Element* context = 0
22# define CP_CONTEXT , const Element* context
23# define CP_PASS_CONTEXT , context
25# define CP_VA_PARSE_ARGS_REST ErrorHandler*, ...
26# define CP_OPT_CONTEXT
28# define CP_PASS_CONTEXT
30#ifndef CLICK_COMPILING_CONFPARSE_CC
31# define CLICK_CONFPARSE_DEPRECATED CLICK_DEPRECATED
33# define CLICK_CONFPARSE_DEPRECATED
38# define CP_SENTINEL __attribute__((sentinel))
107enum { cp_basic_integer_whole = 64 };
108const char *cp_basic_integer(
const char *begin,
const char *end,
int flags,
int size,
void *result);
110inline const char *
cp_integer(
const char *begin,
const char *end,
int base,
int *result);
111inline const char *
cp_integer(
const char *begin,
const char *end,
int base,
unsigned *result);
112inline const char *
cp_integer(
const char *begin,
const char *end,
int base,
long *result);
113inline const char *
cp_integer(
const char *begin,
const char *end,
int base,
unsigned long *result);
115inline const unsigned char *
cp_integer(
const unsigned char *begin,
const unsigned char *end,
int base,
unsigned *result);
116inline const unsigned char *
cp_integer(
const unsigned char *begin,
const unsigned char *end,
int base,
unsigned long *result);
119inline const char *
cp_integer(
const char *begin,
const char *end,
int base,
long long *result);
120inline const char *
cp_integer(
const char *begin,
const char *end,
int base,
unsigned long long *result);
122inline const unsigned char *
cp_integer(
const unsigned char *begin,
const unsigned char *end,
int base,
unsigned long long *result);
124#elif HAVE_INT64_TYPES && !HAVE_INT64_IS_LONG
125inline const char *
cp_integer(
const char *begin,
const char *end,
int base, int64_t *result);
126inline const char *
cp_integer(
const char *begin,
const char *end,
int base, uint64_t *result);
128inline const unsigned char *
cp_integer(
const unsigned char *begin,
const unsigned char *end,
int base, uint64_t *result);
138inline bool cp_integer(
const String &str,
int base,
unsigned long long *result);
139#elif HAVE_INT64_TYPES && !HAVE_INT64_IS_LONG
151#elif HAVE_INT64_TYPES && !HAVE_INT64_IS_LONG
156#define CP_REAL2_MAX_FRAC_BITS 28
161bool cp_real10(
const String& str,
int frac_digits, uint32_t* result_int, uint32_t* result_frac);
183bool cp_ip_prefix(
const String& str,
unsigned char* result_addr,
unsigned char* result_mask,
bool allow_bare_address CP_OPT_CONTEXT);
185bool cp_ip_prefix(
const String& str,
unsigned char* result_addr,
unsigned char* result_mask CP_OPT_CONTEXT);
193bool cp_ip6_prefix(
const String& str, IP6Address* result_addr,
int* result_prefix,
bool allow_bare_address CP_OPT_CONTEXT);
194bool cp_ip6_prefix(
const String& str,
unsigned char* result_addr,
int* result_prefix,
bool allow_bare_address CP_OPT_CONTEXT);
195bool cp_ip6_prefix(
const String& str,
unsigned char* result_addr,
unsigned char* result_mask,
bool allow_bare_address CP_OPT_CONTEXT);
196bool cp_ip6_prefix(
const String& str, IP6Address* result_addr, IP6Address* result_mask,
bool allow_bare_address CP_OPT_CONTEXT);
212#if CLICK_USERLEVEL || CLICK_TOOL
218bool cp_anno(
const String &str,
int size,
int *result CP_OPT_CONTEXT);
244 cpkPositional =
cpkP,
305#if CLICK_USERLEVEL || CLICK_TOOL
318 cpInterval CLICK_CONFPARSE_DEPRECATED,
319 cpReadHandlerCall CLICK_CONFPARSE_DEPRECATED,
320 cpWriteHandlerCall CLICK_CONFPARSE_DEPRECATED;
325String cp_unparse_bool(
bool value);
326String cp_unparse_real2(int32_t value,
int frac_bits);
327String cp_unparse_real2(uint32_t value,
int frac_bits);
329String cp_unparse_real2(int64_t value,
int frac_bits);
330String cp_unparse_real2(uint64_t value,
int frac_bits);
332String cp_unparse_real10(int32_t value,
int frac_digits);
333String cp_unparse_real10(uint32_t value,
int frac_digits);
334String cp_unparse_milliseconds(uint32_t value);
335String cp_unparse_microseconds(uint32_t value);
337String cp_unparse_interval(
const struct timeval& value) CLICK_DEPRECATED;
338String cp_unparse_bandwidth(uint32_t value);
371typedef void (*cp_parsefunc)(cp_value* value,
const String& arg,
373typedef void (*cp_storefunc)(cp_value* value CP_CONTEXT);
382 const char* description;
389 const cp_argtype* argtype;
391 const char* description CLICK_CONFPARSE_DEPRECATED;
411 int64_t i64 CLICK_DEPRECATED;
418 unsigned char address[16];
430 cpArgNormal = 0, cpArgStore2 = 1, cpArgExtraInt = 2,
431 cpArgExtraCStr = 4, cpArgAllowNumbers = 8
433int cp_register_argtype(
const char* name,
const char* description,
int flags,
434 cp_parsefunc parsefunc, cp_storefunc storefunc,
435 void* user_data = 0);
436void cp_unregister_argtype(
const char* name);
438int cp_register_stringlist_argtype(
const char* name,
const char* description,
440int cp_extend_stringlist_argtype(
const char* name, ...);
447#define cp_integer64 cp_integer
448#define cp_unsigned64 cp_integer
449#define cp_unsigned cp_integer
450#define cp_unsigned_real10 cp_real10
451#define cp_unsigned_real2 cp_real2
513inline const char *
cp_integer(
const char *begin,
const char *end,
int base,
int *result)
515 return cp_basic_integer(begin, end, base, -(
int)
sizeof(*result), result);
538 return cp_basic_integer(str.
begin(), str.
end(), base + cp_basic_integer_whole, -(
int)
sizeof(*result), result) != str.
begin();
542inline const char *
cp_integer(
const char *begin,
const char *end,
int base,
unsigned *result)
544 return cp_basic_integer(begin, end, base, (
int)
sizeof(*result), result);
548inline const unsigned char *
cp_integer(
const unsigned char *begin,
const unsigned char *end,
int base,
unsigned *result)
550 return reinterpret_cast<const unsigned char *
>(
cp_integer(
reinterpret_cast<const char *
>(begin),
reinterpret_cast<const char *
>(end), base, result));
555inline const char *
cp_integer(
const char *begin,
const char *end,
int base,
long *result)
557 return cp_basic_integer(begin, end, base, -(
int)
sizeof(*result), result);
560inline const char *
cp_integer(
const char *begin,
const char *end,
int base,
unsigned long *result)
562 return cp_basic_integer(begin, end, base, (
int)
sizeof(*result), result);
566inline const unsigned char *
cp_integer(
const unsigned char *begin,
const unsigned char *end,
int base,
unsigned long *result)
568 return reinterpret_cast<const unsigned char *
>(
cp_integer(
reinterpret_cast<const char *
>(begin),
reinterpret_cast<const char *
>(end), base, result));
575inline const char *
cp_integer(
const char *begin,
const char *end,
int base,
long long *result)
577 return cp_basic_integer(begin, end, base, -(
int)
sizeof(*result), result);
580inline const char *
cp_integer(
const char *begin,
const char *end,
int base,
unsigned long long *result)
582 return cp_basic_integer(begin, end, base, (
int)
sizeof(*result), result);
586inline const unsigned char *
cp_integer(
const unsigned char *begin,
const unsigned char *end,
int base,
unsigned long long *result)
588 return reinterpret_cast<const unsigned char *
>(
cp_integer(
reinterpret_cast<const char *
>(begin),
reinterpret_cast<const char *
>(end), base, result));
592#elif HAVE_INT64_TYPES && !HAVE_INT64_IS_LONG
594inline const char *
cp_integer(
const char *begin,
const char *end,
int base, int64_t *result)
596 return cp_basic_integer(begin, end, base, -(
int)
sizeof(*result), result);
599inline const char *
cp_integer(
const char *begin,
const char *end,
int base, uint64_t *result)
601 return cp_basic_integer(begin, end, base, (
int)
sizeof(*result), result);
605inline const unsigned char *
cp_integer(
const unsigned char *begin,
const unsigned char *end,
int base, uint64_t *result)
607 return reinterpret_cast<const unsigned char *
>(
cp_integer(
reinterpret_cast<const char *
>(begin),
reinterpret_cast<const char *
>(end), base, result));
617 return cp_basic_integer(str.
begin(), str.
end(), base + cp_basic_integer_whole, (
int)
sizeof(*result), result) != str.
begin();
622 return cp_basic_integer(str.
begin(), str.
end(), base + cp_basic_integer_whole, -(
int)
sizeof(*result), result) != str.
begin();
627 return cp_basic_integer(str.
begin(), str.
end(), base + cp_basic_integer_whole, (
int)
sizeof(*result), result) != str.
begin();
634 return cp_basic_integer(str.
begin(), str.
end(), base + cp_basic_integer_whole, -(
int)
sizeof(*result), result) != str.
begin();
637inline bool cp_integer(
const String &str,
int base,
unsigned long long *result)
639 return cp_basic_integer(str.
begin(), str.
end(), base + cp_basic_integer_whole, (
int)
sizeof(*result), result) != str.
begin();
642#elif HAVE_INT64_TYPES && !HAVE_INT64_IS_LONG
646 return cp_basic_integer(str.
begin(), str.
end(), base + cp_basic_integer_whole, -(
int)
sizeof(*result), result) != str.
begin();
651 return cp_basic_integer(str.
begin(), str.
end(), base + cp_basic_integer_whole, (
int)
sizeof(*result), result) != str.
begin();
661 return cp_basic_integer(str.
begin(), str.
end(), cp_basic_integer_whole, -(
int)
sizeof(*result), result) != str.
begin();
666 return cp_basic_integer(str.
begin(), str.
end(), cp_basic_integer_whole, (
int)
sizeof(*result), result) != str.
begin();
671 return cp_basic_integer(str.
begin(), str.
end(), cp_basic_integer_whole, -(
int)
sizeof(*result), result) != str.
begin();
676 return cp_basic_integer(str.
begin(), str.
end(), cp_basic_integer_whole, (
int)
sizeof(*result), result) != str.
begin();
683 return cp_basic_integer(str.
begin(), str.
end(), cp_basic_integer_whole, -(
int)
sizeof(*result), result) != str.
begin();
688 return cp_basic_integer(str.
begin(), str.
end(), cp_basic_integer_whole, (
int)
sizeof(*result), result) != str.
begin();
691#elif HAVE_INT64_TYPES && !HAVE_INT64_IS_LONG
695 return cp_basic_integer(str.
begin(), str.
end(), cp_basic_integer_whole, -(
int)
sizeof(*result), result) != str.
begin();
700 return cp_basic_integer(str.
begin(), str.
end(), cp_basic_integer_whole, (
int)
sizeof(*result), result) != str.
begin();
713 return cp_ip6_address(str,
reinterpret_cast<IP6Address *
>(x) CP_PASS_CONTEXT);
724inline int cp_register_argtype(
const char* name,
const char* description,
int flags,
726 void (*storefunc)(cp_value *,
Element *),
727 void *user_data = 0) {
728 return cp_register_argtype(name, description, flags,
729 (cp_parsefunc) parsefunc,
730 (cp_storefunc) storefunc,
735inline String cp_pop_spacevec(
String &str) CLICK_DEPRECATED;
744#undef CP_VA_ARGS_REST
747#undef CP_PASS_CONTEXT
748#undef CLICK_CONFPARSE_DEPRECATED
750#define cpEnd ((CpVaParseCmd) 0)
Base class for Click elements.
Definition element.hh:42
Error reporting class.
Definition error.hh:90
An Ethernet address.
Definition etheraddress.hh:9
Convenience class for calling handlers.
Definition handlercall.hh:143
Represents a router's handlers.
Definition handler.hh:19
An IPv4 address.
Definition ipaddress.hh:16
A router configuration.
Definition router.hh:28
Efficiently build up Strings from pieces.
Definition straccum.hh:28
A string of characters.
Definition string.hh:22
const_iterator end() const
Return an iterator for the end of the string.
Definition string.hh:584
const_iterator begin() const
Return an iterator for the first character in the string.
Definition string.hh:576
Represents a moment or interval in time.
Definition timestamp.hh:125
Vector template.
Definition vector.hh:111
iterator end()
Return an iterator for the end of the vector.
Definition vector.hh:266
iterator begin()
Return an iterator for the first element in the vector.
Definition vector.hh:253
const CpVaParseCmd cpSecondsAsMilli
Result storage uint32_t*, parsed by cp_seconds_as_milli().
Definition confparse.hh:280
int cp_va_kparse_remove_keywords(Vector< String > &conf, const Element *context, ErrorHandler *errh,...) CP_SENTINEL
Parse and remove matching arguments from conf.
Definition confparse.cc:3913
const CpVaParseCmd cpReal10
Parse parameter int frac_digits, result storage int32_t*, parsed by cp_real10().
Definition confparse.hh:274
const CpVaParseCmd cpUnsigned
Result storage uint32_t*, parsed by cp_integer().
Definition confparse.hh:266
bool cp_double(const String &str, double *result)
Parse a real number from str.
Definition confparse.cc:1336
bool cp_time(const String &str, Timestamp *result, bool allow_negative=false)
Parse a timestamp from str.
Definition confparse.cc:1526
void cp_va_static_initialize()
Initialize the cp_va_kparse() implementation.
Definition confparse.cc:4189
void cp_spacevec(const String &str, Vector< String > &conf)
Separate a configuration string into arguments at unquoted spaces.
Definition confparse.cc:768
bool cp_tcpudp_port(const String &str, int proto, uint16_t *result, const Element *context=0)
Parse a TCP, UDP, etc. port number from str.
Definition confparse.cc:1939
String cp_unargvec(const Vector< String > &conf)
Join the strings of conf with commas and return the result.
Definition confparse.cc:815
bool cp_is_space(const String &str)
Test if str is all spaces.
Definition confparse.hh:466
bool cp_seconds_as_micro(const String &str, uint32_t *result)
Parse an amount of time in microseconds from str.
Definition confparse.cc:1480
const CpVaParseCmd cpUnsignedShort
Result storage unsigned short*, parsed by cp_integer().
Definition confparse.hh:264
const CpVaParseCmd cpIP6Prefix
Result storage IP6Address* addr and IP6Address* mask, parsed by cp_ip6_prefix().
Definition confparse.hh:302
bool cp_keyword(const String &str, String *result, String *rest=0)
Parse a keyword from str.
Definition confparse.cc:966
const CpVaParseCmd cpIPPrefix
Result storage IPAddress* addr and IPAddress *mask, parsed by cp_ip_prefix().
Definition confparse.hh:287
const CpVaParseCmd cpWord
Result storage String*, parsed by cp_word().
Definition confparse.hh:259
void cp_va_static_cleanup()
Clean up the cp_va_kparse() implementation.
Definition confparse.cc:4282
const CpVaParseCmd cpHandlerCallWrite
Result storage HandlerCall*, parsed by HandlerCall.
Definition confparse.hh:298
const CpVaParseCmd cpIP6Address
Result storage IP6Address* or equivalent, parsed by cp_ip6_address().
Definition confparse.hh:301
const CpVaParseCmd cpEnd
Use as argument name. Ends cp_va argument list.
Definition confparse.cc:2197
bool cp_handler(const String &str, int flags, Element **result_element, const Handler **result_handler, const Element *context, ErrorHandler *errh=0)
Parse a handler reference from str.
Definition confparse.cc:2108
bool cp_string(const String &str, String *result, String *rest=0)
Parse a string from str.
Definition confparse.cc:868
bool cp_real10(const String &str, int frac_digits, int32_t *result)
Parse a real number from str, representing the result as an integer with frac_digits decimal digits o...
Definition confparse.cc:1232
const CpVaParseCmd cpSize
Result storage size_t*, parsed by cp_integer().
Definition confparse.hh:267
const CpVaParseCmd cpConfirmKeywords
cp_va_parse only: Following arguments are confirmed keywords.
Definition confparse.hh:314
bool cp_seconds_as(const String &str, int frac_digits, uint32_t *result)
Parse an amount of time from str.
Definition confparse.cc:1447
bool cp_ip6_address(const String &str, IP6Address *result, const Element *context=0)
Parse an IPv6 address from str.
Definition confparse.cc:1803
const CpVaParseCmd cpNamedInteger
Parse parameter uint32_t nameinfo_type, result storage int32_t*, parsed by NameInfo::query_int.
Definition confparse.hh:268
const CpVaParseCmd cpIP6PrefixLen
Result storage IP6Address* addr and int* prefix_len, parsed by cp_ip6_prefix().
Definition confparse.hh:303
int cp_va_parse_remove_keywords(Vector< String > &conf, int first, const Element *context, ErrorHandler *errh,...)
Legacy function for parsing and removing matching arguments from conf.
Definition confparse.cc:3718
const CpVaParseCmd cpArgument
Result storage String*, accepts any argument.
Definition confparse.hh:256
const CpVaParseCmd cpTCPPort
Result storage uint16_t*, parsed by cp_tcpudp_port().
Definition confparse.hh:292
const CpVaParseCmd cpIgnoreRest
Use as argument name. No result storage; causes cp_va_kparse() to ignore unparsed arguments and any r...
Definition confparse.hh:254
int cp_va_space_parse(const String &str, const Element *context, ErrorHandler *errh,...)
Legacy function for parsing a space-separated argument string.
Definition confparse.cc:3657
const char * cp_skip_comment_space(const char *begin, const char *end)
Find the first nonspace, noncomment character in the string [begin, end).
Definition confparse.cc:361
const CpVaParseCmd cpFilename
Result storage String*, parsed by cp_filename().
Definition confparse.hh:306
bool cp_real2(const String &str, int frac_bits, int32_t *result)
Parse a fixed-point number from str.
Definition confparse.cc:1304
const CpVaParseCmd cpUnsignedReal2
Parse parameter int frac_bits, result storage uint32_t*, parsed by cp_real2().
Definition confparse.hh:273
CpKparseFlags
Type of flags for cp_va_kparse() items.
Definition confparse.hh:236
@ cpkP
Argument may be specified positionally.
Definition confparse.hh:239
@ cpkN
Default flags.
Definition confparse.hh:237
@ cpkD
Argument is deprecated.
Definition confparse.hh:241
@ cpkC
Argument presence should be confirmed.
Definition confparse.hh:240
@ cpkM
Argument is mandatory.
Definition confparse.hh:238
const CpVaParseCmd cpSecondsAsMicro
Result storage uint32_t*, parsed by cp_seconds_as_micro().
Definition confparse.hh:281
String cp_unquote(const String &str)
Remove one level of quoting from str, returning the result.
Definition confparse.cc:571
const CpVaParseCmd cpBool
Result storage bool*, parsed by cp_bool().
Definition confparse.hh:261
bool cp_ethernet_address(const String &str, EtherAddress *result, const Element *context=0)
Parse an Ethernet address from str.
Definition confparse.cc:1914
const char * cp_integer(const char *begin, const char *end, int base, int *result)
Parse an integer from [begin, end) in base base.
Definition confparse.hh:513
bool cp_anno(const String &str, int size, int *result, const Element *context=0)
Parse a packet annotation value from str.
Definition confparse.cc:2181
const CpVaParseCmd cpString
Result storage String*, parsed by cp_string().
Definition confparse.hh:258
const CpVaParseCmd cpKeyword
Result storage String*, parsed by cp_keyword().
Definition confparse.hh:260
bool cp_bool(const String &str, bool *result)
Parse a boolean from str.
Definition confparse.cc:1034
const CpVaParseCmd cpByte
Result storage unsigned char*, parsed by cp_integer().
Definition confparse.hh:262
int cp_va_space_kparse(const String &str, const Element *context, ErrorHandler *errh,...) CP_SENTINEL
Parse a space-separated argument string.
Definition confparse.cc:3841
bool cp_ip_address_list(const String &str, Vector< IPAddress > *result, const Element *context=0)
Parse a space-separated list of IP addresses from str.
Definition confparse.cc:1741
const CpVaParseCmd cpEthernetAddress
Result storage EtherAddress*, parsed by cp_ethernet_address(). Synonym for cpEtherAddress.
Definition confparse.hh:291
const CpVaParseCmd cpShort
Result storage short*, parsed by cp_integer().
Definition confparse.hh:263
bool cp_filename(const String &str, String *result)
Parse a filename string from str.
Definition confparse.cc:2145
int cp_va_kparse_keyword(const String &str, const Element *context, ErrorHandler *errh,...) CP_SENTINEL
Parse a single argument.
Definition confparse.cc:3873
const CpVaParseCmd cpUDPPort
Result storage uint16_t*, parsed by cp_tcpudp_port().
Definition confparse.hh:293
int cp_va_kparse(const Vector< String > &conf, const Element *context, ErrorHandler *errh,...) CP_SENTINEL
Parse a list of arguments.
Definition confparse.cc:3779
const CpVaParseCmd cpInteger64
Result storage int64_t*, parsed by cp_integer().
Definition confparse.hh:270
const CpVaParseCmd cpIgnore
No result storage, ignores this argument.
Definition confparse.hh:255
String cp_uncomment(const String &str)
Simplify str's whitespace and replace comments by spaces, returning the result.
Definition confparse.cc:442
bool cp_is_click_id(const String &str)
Test if str is a valid Click identifier.
Definition confparse.cc:257
String cp_unspacevec(const String *begin, const String *end)
Join the strings in [begin, end) with spaces and return the result.
Definition confparse.cc:838
bool cp_bandwidth(const String &str, uint64_t *result)
Parse a bandwidth value from str.
Definition confparse.cc:1592
const CpVaParseCmd cpUnsignedReal10
Parse parameter int frac_digits, result storage uint32_t*, parsed by cp_real10().
Definition confparse.hh:275
bool cp_ip_address(const String &str, IPAddress *result, const Element *context=0)
Parse an IP address from str.
Definition confparse.cc:1654
String cp_shift_spacevec(String &str)
Remove and return the first space-separated argument from str.
Definition confparse.cc:785
const CpVaParseCmd cpMandatoryKeywords
cp_va_parse only: Following arguments are mandatory keywords.
Definition confparse.hh:315
const char * CpVaParseCmd
Type of argument type names for cp_va_kparse() items.
Definition confparse.hh:250
const CpVaParseCmd cpBandwidth
Result storage uint32_t*, parsed by cp_bandwidth().
Definition confparse.hh:285
bool cp_word(const String &str, String *result, String *rest=0)
Parse a word from str.
Definition confparse.cc:935
const char * cp_process_backslash(const char *begin, const char *end, StringAccum &sa)
Process a backslash escape, appending results to sa.
Definition confparse.cc:477
const CpVaParseCmd cpHandlerName
Result storage Element** and String*, parsed by cp_handler_name().
Definition confparse.hh:296
bool cp_eat_space(String &str)
Remove spaces from the beginning of str.
Definition confparse.cc:227
const CpVaParseCmd cpIPAddressList
Result storage Vector<IPAddress>*, parsed by cp_ip_address_list().
Definition confparse.hh:289
const CpVaParseCmd cpOptional
cp_va_parse only: Following arguments are optional.
Definition confparse.hh:312
String cp_quote(const String &str, bool allow_newlines=false)
Return a quoted version of str.
Definition confparse.cc:629
const CpVaParseCmd cpAnno
Parse parameter int annotation_size, result storage int*, parsed by cp_anno().
Definition confparse.hh:310
const CpVaParseCmd cpTimeval
Result storage struct timeval*, parsed by cp_time().
Definition confparse.hh:284
bool cp_file_offset(const String &str, off_t *result)
Parse a file offset from str.
Definition confparse.cc:1101
bool cp_ip_prefix(const String &str, IPAddress *result_addr, IPAddress *result_mask, bool allow_bare_address, const Element *context=0)
Parse an IP address or prefix from str.
Definition confparse.cc:1703
const CpVaParseCmd cpEtherAddress
Result storage EtherAddress*, parsed by cp_ethernet_address().
Definition confparse.hh:290
bool cp_is_word(const String &str)
Test whether str is a valid "word".
Definition confparse.cc:241
const CpVaParseCmd cpKeywords
cp_va_parse only: Following arguments are keywords.
Definition confparse.hh:313
int cp_assign_arguments(const Vector< String > &argv, const String *param_begin, const String *param_end, Vector< String > *values=0)
Assign arguments from argv to values.
Definition confparse.cc:3973
bool cp_seconds(const String &str, double *result)
Parse an amount of time from str.
Definition confparse.cc:1499
const CpVaParseCmd cpHandlerCallPtrRead
Result storage HandlerCall**, parsed by HandlerCall::reset_read.
Definition confparse.hh:299
bool cp_handler_name(const String &str, Element **result_element, String *result_hname, const Element *context, ErrorHandler *errh=0)
Parse a handler name from str.
Definition confparse.cc:2044
const CpVaParseCmd cpSeconds
Result storage uint32_t*, parsed by cp_seconds_as() with frac_digits 0.
Definition confparse.hh:279
void cp_argvec(const String &str, Vector< String > &conf)
Separate a configuration string into arguments at commas.
Definition confparse.cc:697
const CpVaParseCmd cpIPAddress
Result storage IPAddress* or equivalent, parsed by cp_ip_address().
Definition confparse.hh:286
Element * cp_element(const String &str, const Element *context, ErrorHandler *errh=0, const char *argname=0)
Parse an element reference from str.
Definition confparse.cc:1972
const char * cp_skip_double_quote(const char *begin, const char *end)
Return the first character after a double-quoted string starting at begin.
Definition confparse.cc:320
const CpVaParseCmd cpFileOffset
Result storage off_t*, parsed by cp_integer().
Definition confparse.hh:307
String cp_shift_delimiter(String &str, char delim)
Remove and return the first delimiter-separated argument from str.
Definition confparse.cc:796
const char * cp_skip_space(const char *begin, const char *end)
Find the first nonspace character in the string [begin, end).
Definition confparse.cc:216
const CpVaParseCmd cpDouble
Result storage double*, parsed by cp_double().
Definition confparse.hh:277
const CpVaParseCmd cpArguments
Result storage Vector<String>*, accepts any number of arguments with the same keyword.
Definition confparse.hh:257
const CpVaParseCmd cpElementCast
Parse parameter const char*, result storage void**, parsed by cp_element() and Element::cast().
Definition confparse.hh:295
const CpVaParseCmd cpTimestamp
Result storage Timestamp*, parsed by cp_time().
Definition confparse.hh:282
int cp_va_parse(const Vector< String > &conf, const Element *context, ErrorHandler *errh,...)
Legacy function for parsing a list of arguments.
Definition confparse.cc:3601
int cp_va_parse_keyword(const String &str, const Element *context, ErrorHandler *errh,...)
Legacy function for parsing a single argument.
Definition confparse.cc:3686
const CpVaParseCmd cpHandlerCallPtrWrite
Result storage HandlerCall**, parsed by HandlerCall::reset_write.
Definition confparse.hh:300
const CpVaParseCmd cpElement
Result storage Element**, parsed by cp_element().
Definition confparse.hh:294
const CpVaParseCmd cpIP6AddressOrPrefix
Result storage IP6Address* addr and IP6Address* mask, parsed by cp_ip6_prefix().
Definition confparse.hh:304
const CpVaParseCmd cpHandlerCallRead
Result storage HandlerCall*, parsed by HandlerCall.
Definition confparse.hh:297
const CpVaParseCmd cpInteger
Result storage int32_t*, parsed by cp_integer().
Definition confparse.hh:265
bool cp_seconds_as_milli(const String &str, uint32_t *result)
Parse an amount of time in milliseconds from str.
Definition confparse.cc:1467
const CpVaParseCmd cpUnsigned64
Result storage uint64_t*, parsed by cp_integer().
Definition confparse.hh:271
bool cp_ip6_prefix(const String &str, IP6Address *result_addr, int *result_prefix, bool allow_bare_address, const Element *context=0)
Parse an IPv6 address or prefix from str.
Definition confparse.cc:1869
const CpVaParseCmd cpIPAddressOrPrefix
Result storage IPAddress* addr and IPAddress *mask, parsed by cp_ip_prefix().
Definition confparse.hh:288
const CpVaParseCmd cpTimestampSigned
Result storage Timestamp*, parsed by cp_time().
Definition confparse.hh:283
Click's vector container template.