msg_generic.c File Reference


Detailed Description

Functions for generic headers.

Author:
Pekka Pessi <Pekka.Pessi@nokia-email.address.hidden>
Date:
Created: Thu Jan 23 20:08:00 2003 ppessi

#include "config.h"
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <stdio.h>
#include <stdarg.h>
#include <sofia-sip/su_alloc.h>
#include "sofia-sip/msg.h"
#include "sofia-sip/bnf.h"
#include "sofia-sip/msg_parser.h"
#include "sofia-sip/msg_header.h"

Include dependency graph for msg_generic.c:


Functions

int msg_generic_d (su_home_t *home, msg_header_t *h, char *s, int slen)
 Parse a generic header.
int msg_generic_e (char b[], int bsiz, msg_header_t const *h, int flags)
 Encode a generic header.
int msg_generic_dup_xtra (msg_header_t const *h, int offset)
 Calculate the size of strings associated with a msg_generic_t object.
char * msg_generic_dup_one (msg_header_t *dst, msg_header_t const *src, char *b, int xtra)
 Duplicate one msg_generic_t object.
int msg_list_append_items (su_home_t *home, msg_list_t *k, msg_param_t const items[])
 Append a list of constant items to a list.
int msg_list_replace_items (su_home_t *home, msg_list_t *k, msg_param_t const items[])
 Replace a list of constant items on a list.

Function Documentation

int msg_generic_d ( su_home_t home,
msg_header_t h,
char *  s,
int  slen 
)

Parse a generic header.

The function msg_generic_d() parses a generic header structure.

Parameters:
home memory home [IN]
h header structure [IN/OUT]
s string to be parsed [IN]
slen length of the string [IN]
Return values:
0 when successful,
-1 upon an error.

int msg_generic_e ( char  b[],
int  bsiz,
msg_header_t const *  h,
int  flags 
)

Encode a generic header.

The function msg_generic_e encodes a generic header.


Sofia-SIP 1.12.1 - Copyright (C) 2006 Nokia Corporation. All rights reserved. Licensed under the terms of the GNU Lesser General Public License.