#include <stdio.h>#include "../../str.h"#include "../../parser/parse_param.h"#include "../../parser/parse_to.h"#include "../../parser/parse_via.h"#include "../../parser/parse_disposition.h"#include "encode_parameters.h"

Go to the source code of this file.
Defines | |
| #define | _GNU_SOURCE |
| #define | REL_PTR(a, b) (unsigned char)((b)-(a)) |
Functions | |
| int | encode_parameters (unsigned char *where, void *pars, char *hdrstart, void *_body, char to) |
| int | print_encoded_parameters (FILE *fd, unsigned char *payload, char *hdr, int paylen, char *prefix) |
| param_t * | reverseParameters (param_t *p) |
| #define _GNU_SOURCE |
Definition at line 39 of file encode_parameters.c.
| #define REL_PTR | ( | a, | |||
| b | ) | (unsigned char)((b)-(a)) |
Definition at line 48 of file encode_parameters.c.
| int encode_parameters | ( | unsigned char * | where, | |
| void * | pars, | |||
| char * | hdrstart, | |||
| void * | _body, | |||
| char | to | |||
| ) |
Returns how many bytes in *where have been used
TODO this is little shitty, someone should unify all the param flavours to a sigle universal type of parameter (to_param,param,disposition_param) the way is done here, at least, we dont have the parameter-hanling code spread all around.
Definition at line 57 of file encode_parameters.c.
References disposition_param::body, param::body, via_body::last_param, to_body::last_param, _str::len, via_param::name, disposition_param::name, param::name, to_param::name, via_param::next, disposition_param::next, param::next, to_param::next, params, REL_PTR, reverseParameters(), _str::s, via_param::value, and to_param::value.
Referenced by encode_contact(), encode_content_disposition(), encode_route(), encode_to_body(), encode_uri2(), and encode_via().
| int print_encoded_parameters | ( | FILE * | fd, | |
| unsigned char * | payload, | |||
| char * | hdr, | |||
| int | paylen, | |||
| char * | prefix | |||
| ) |
Definition at line 213 of file encode_parameters.c.
References via_body::i.
Referenced by print_encoded_contact(), print_encoded_content_disposition(), print_encoded_route(), print_encoded_to_body(), and print_encoded_uri().
reverses a param_t linked-list
Definition at line 198 of file encode_parameters.c.
References param::next, and NULL.
Referenced by encode_parameters().
1.5.6