This file is indexed.

/usr/include/sofia-sip-1.12/sofia-sip/msg.h is in libsofia-sip-ua-dev 1.12.11+20110422.1-2.1build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
/*
 * This file is part of the Sofia-SIP package
 *
 * Copyright (C) 2005 Nokia Corporation.
 *
 * Contact: Pekka Pessi <pekka.pessi@nokia.com>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public License
 * as published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA
 *
 */

#ifndef MSG_H
/** Defined when <sofia-sip/msg.h> has been included */
#define MSG_H
/**@file sofia-sip/msg.h
 *
 * Base message interface.
 *
 * @author Pekka Pessi <Pekka.Pessi@nokia.com>
 *
 * @date Created: Fri Feb 18 08:54:48 2000 ppessi
 */

#include <sofia-sip/msg_types.h>
#include <sofia-sip/su_alloc.h>

SOFIA_BEGIN_DECLS

SOFIAPUBFUN msg_t *msg_create(msg_mclass_t const *mc, int flags);

SOFIAPUBFUN msg_t *msg_ref(msg_t *);
SOFIAPUBFUN void msg_unref(msg_t *);

SOFIAPUBFUN void msg_destroy(msg_t *);

SOFIAPUBFUN msg_t *msg_copy(msg_t *);
SOFIAPUBFUN msg_t *msg_dup(msg_t const *);

SOFIAPUBFUN msg_t *msg_make(msg_mclass_t const *mc, int flags,
			    void const *data, ssize_t len);
SOFIAPUBFUN char *msg_as_string(su_home_t *home,
				msg_t *msg, msg_pub_t *pub, int flags,
				size_t *return_len);

SOFIAPUBFUN void msg_set_parent(msg_t *kid, msg_t *dad);

SOFIAPUBFUN msg_t *msg_ref_create(msg_t *);
SOFIAPUBFUN void msg_ref_destroy(msg_t *);

SOFIAPUBFUN msg_pub_t *msg_public(msg_t const *msg, void *tag);
SOFIAPUBFUN msg_pub_t *msg_object(msg_t const *msg);
SOFIAPUBFUN msg_mclass_t const *msg_mclass(msg_t const *msg);

SOFIAPUBFUN int msg_extract(msg_t *msg);
SOFIAPUBFUN unsigned msg_extract_errors(msg_t const *msg);
SOFIAPUBFUN int msg_is_complete(msg_t const *msg);
SOFIAPUBFUN int msg_has_error(msg_t const *msg);
SOFIAPUBFUN msg_header_t **msg_chain_head(msg_t const *msg);

SOFIAPUBFUN int msg_serialize(msg_t *msg, msg_pub_t *mo);
SOFIAPUBFUN int msg_prepare(msg_t *msg);
SOFIAPUBFUN void msg_unprepare(msg_t *msg);
SOFIAPUBFUN int msg_is_prepared(msg_t const *msg);

SOFIAPUBFUN usize_t msg_size(msg_t const *msg);
SOFIAPUBFUN usize_t msg_maxsize(msg_t *msg, usize_t maxsize);

/** Cast a #msg_t pointer to a #su_home_t pointer. */
#define msg_home(h) ((su_home_t*)(h))

/** Streaming state of a #msg_t object. */
enum msg_streaming_status {
  /** Disable streaming */
  msg_stop_streaming = 0,
  /** Enable streaming */
  msg_start_streaming = 1
};

SOFIAPUBFUN int msg_is_streaming(msg_t const *msg);
SOFIAPUBFUN void msg_set_streaming(msg_t *msg, enum msg_streaming_status what);

SOFIAPUBFUN unsigned msg_mark_as_complete(msg_t *msg, unsigned mask);

SOFIAPUBFUN unsigned msg_get_flags(msg_t const *msg, unsigned mask);
SOFIAPUBFUN unsigned msg_set_flags(msg_t *msg, unsigned mask);
SOFIAPUBFUN unsigned msg_zap_flags(msg_t *msg, unsigned mask);

/** Flags controlling parser/printer. */
enum msg_flg_user {
  /** Use compact form when printing. */
  MSG_FLG_COMPACT = (1<<0),
  /** Use canonic representation when printing. */
  MSG_FLG_CANONIC = (1<<1),
  /** Cache a copy of headers when parsing. */
  MSG_FLG_EXTRACT_COPY = (1<<2),
  /** Print comma-separated lists instead of separate headers */
  MSG_FLG_COMMA_LISTS = (1<<3),

  /**Use mailbox format when parsing - in mailbox format
   * message has no body unless Content-Length header is present.
   */
  MSG_FLG_MAILBOX = (1<<4),

  /** Use multiple parts for message body */
  MSG_FLG_CHUNKING = (1<<5),

  /** Enable streaming - parser gives completed message fragments when they
   * are ready to upper layers */
  MSG_FLG_STREAMING = (1<<6),

  /** Make messages threadsafe. */
  MSG_FLG_THRDSAFE = (1<<15),

  MSG_FLG_USERMASK = (1<<16) - 1
};

/** Flags used by parser. */
enum  msg_flg_parser {
  /** Extract headers for this message */
  MSG_FLG_HEADERS = (1<<16),
  /** Extract body for this message */
  MSG_FLG_BODY = (1<<17),
  /** Extract chunks for this message */
  MSG_FLG_CHUNKS = (1<<18),
  /** Extract trailers for this message */
  MSG_FLG_TRAILERS = (1<<19),
  /** Extract last component of this message */
  MSG_FLG_FRAGS = (1<<20),
  /** This message has been completely extracted */
  MSG_FLG_COMPLETE = (1<<24),

  /** This message has parsing errors */
  MSG_FLG_ERROR = (1<<25),
  /** This message is too large */
  MSG_FLG_TOOLARGE = (1<<26),
  /** This message is truncated */
  MSG_FLG_TRUNC = (1<<27),
  /** This message has timeout */
  MSG_FLG_TIMEOUT = (1<<28),

  MSG_FLG_PARSERMASK = ((-1) ^ ((1<<16) - 1))
};

#define MSG_DO_COMPACT      MSG_FLG_COMPACT
#define MSG_DO_CANONIC      MSG_FLG_CANONIC
#define MSG_DO_EXTRACT_COPY MSG_FLG_EXTRACT_COPY

/** Test if all the flags in @a v are set in @a f. */
#define MSG_FLAGS(f, v) (((f) & (v)) == v)

#define MSG_IS_COMPACT(f)      MSG_FLAGS((f), MSG_FLG_COMPACT)
#define MSG_IS_CANONIC(f)      MSG_FLAGS((f), MSG_FLG_CANONIC)
#define MSG_IS_EXTRACT_COPY(f) MSG_FLAGS((f), MSG_FLG_EXTRACT_COPY)
#define MSG_IS_COMMA_LISTS(f)  MSG_FLAGS((f), MSG_FLG_COMMA_LISTS)
#define MSG_IS_MAILBOX(f)      MSG_FLAGS((f), MSG_FLG_MAILBOX)

#define MSG_HAS_COMPLETE(f)    MSG_FLAGS((f), MSG_FLG_COMPLETE)
#define MSG_HAS_ERROR(f)       MSG_FLAGS((f), MSG_FLG_ERROR)

#define MSG_IS_COMPLETE(mo) (((mo)->msg_flags & MSG_FLG_COMPLETE) != 0)

SOFIA_END_DECLS

#endif /* MSG_H */