Mercurial > hg > freeDiameter
diff include/freeDiameter/libfdproto.h @ 922:c7bf1a7a4e90
Split the encoders/interpreters for the dictionary types into a different file for better reusability, add decoder/interpreter for Time type based on code from Thomas Klausner
author | Sebastien Decugis <sdecugis@freediameter.net> |
---|---|
date | Thu, 14 Feb 2013 15:43:36 +0100 |
parents | b772af200865 |
children | 877592751fee |
line wrap: on
line diff
--- a/include/freeDiameter/libfdproto.h Thu Feb 14 14:12:23 2013 +0100 +++ b/include/freeDiameter/libfdproto.h Thu Feb 14 15:43:36 2013 +0100 @@ -1163,6 +1163,26 @@ TYPE_OF_AVP /* "what" points to a struct dict_object containing an AVP object. */ }; +/**** + Callbacks defined in libfdproto/dictionary_functions.c file -- see that file for usage. + */ + +/* Convert an Address type AVP into a struct sockaddr_storage */ +int fd_dictfct_Address_encode(void * data, union avp_value * avp_value); +int fd_dictfct_Address_interpret(union avp_value * avp_value, void * interpreted); +char * fd_dictfct_Address_dump(union avp_value * avp_value); + +/* Display the content of an AVP of type UTF8String in the log file */ +char * fd_dictfct_UTF8String_dump(union avp_value * avp_value); + +/* For Time AVPs, map with time_t value directly */ +int fd_dictfct_Time_encode(void * data, union avp_value * avp_value); +int fd_dictfct_Time_interpret(union avp_value * avp_value, void * interpreted); +char * fd_dictfct_Time_dump(union avp_value * avp_value); + + + +/****/ /*** * API usage : @@ -1193,7 +1213,7 @@ } */ - + /* *************************************************************************** *