Parser :: Body handling.
More...
#include "../trim.h"
#include "parser_f.h"
#include "parse_content.h"
#include "parse_param.h"
#include "keys.h"
#include "parse_body.h"
Go to the source code of this file.
Defines
-
#define READ(val) (*(val + 0) + (*(val + 1) << 8) + (*(val + 2) << 16) + (*(val + 3) << 24))
- macros from parse_hname2.c
Functions
- char * get_body_part (struct sip_msg *msg, unsigned short type, unsigned short subtype, int *len)
- Returns the pointer within the msg body to the given type/subtype, and sets the length of the body part.
-
static int get_boundary_param (struct sip_msg *msg, str *boundary)
- returns the value of boundary parameter from the Contect-Type HF
-
static char * get_multipart_body (char *buf, char *buf_end, str *boundary, int *len)
- extract the body of a part from a multipart SIP msg body
-
static char * search_boundary (char *buf, char *buf_end, str *boundary)
- search the next boundary in the buffer
Detailed Description
Definition in file parse_body.c.
Function Documentation
| char* get_body_part |
( |
struct sip_msg * |
msg, |
|
|
unsigned short |
type, |
|
|
unsigned short |
subtype, |
|
|
int * |
len | |
|
) |
| | |
Returns the pointer within the msg body to the given type/subtype, and sets the length.
The result can be the whole msg body, or a part of a multipart body.
Definition at line 175 of file parse_body.c.
References sip_msg::buf, decode_mime_type(), get_body(), get_boundary_param(), get_multipart_body(), _str::len, sip_msg::len, parse_content_type_hdr(), READ, and search_boundary().