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 <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 <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <stdio.h>
#include <stdarg.h>
#include <limits.h>

Include dependency graph for msg_generic.c:


Functions

issize_t msg_generic_d (su_home_t *home, msg_header_t *h, char *s, isize_t slen)
 Parse a generic header.
issize_t msg_generic_e (char b[], isize_t bsiz, msg_header_t const *h, int flags)
 Encode a generic header.
isize_t msg_generic_dup_xtra (msg_header_t const *h, isize_t 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, isize_t 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

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

Parse a generic header.

The function msg_generic_d() parses a generic header structure.

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

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

Encode a generic header.

The function msg_generic_e encodes a generic header.

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.

Return values:
0 when successful
-1 upon an error

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.

Return values:
0 when successful
-1 upon an error


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