Lines Matching defs:header
36 * slp_add_header: creates a SLP message header
37 * slp_get_length: gets the length field from a SLP header
38 * slp_set_length: sets the length field in a SLP header
39 * slp_header_get_sht: gets a 16 bit integer from a SLP header
40 * slp_header_set_sht: sets a 16 bit interger in a SLP header
41 * slp_header_length: calculates the length of a header, including the
252 /* SLPv2 header management */
255 * Lays a SLP header into pcSendBuf, performing byte-ordering and bounds
258 * pcSendBuf: a buffer into which to write the composed header
263 * header + the language tag (i.e. the offset at which the rest of
306 * Retrieves the 24 bit int stored at 'off' offset into 'header'.
307 * Assumes 'header' is a valid SLP message header.
309 unsigned int slp_header_get_int24(const char *header, size_t off) {
312 len = ((unsigned int)(header[off] & 0xff)) << 16;
313 len += ((unsigned int)(header[off + 1] & 0xff)) << 8;
314 len += ((unsigned int)(header[off + 2] & 0xff));
320 * Sets a 24 bit int at the location in 'header' 'off' bytes
321 * offset into the header.
322 * Assumes 'header' is a valid SLP message header.
324 void slp_header_set_int24(char *header, unsigned int len, size_t off) {
325 header[off] = (unsigned char) ((len & 0xff0000) >> 16);
326 header[off + 1] = (unsigned char) ((len & 0xff00) >> 8);
327 header[off + 2] = (unsigned char) (len & 0xff);
331 * Retrieves the 16 bit integer stored at 'off' offset into 'header'.
332 * Assumes 'header' is a valid SLP message header.
334 unsigned short slp_header_get_sht(const char *header, size_t off) {
336 (void) slp_get_sht(header, SLP_HDRLEN, &off, &answer);
341 * Sets a 16 bit interger at the location in 'header' 'off' bytes
342 * offset into the header.
343 * Assumes 'header' is a valid SLP message header.
345 void slp_header_set_sht(char *header, unsigned short len, size_t off) {
346 (void) slp_add_sht(header, SLP_HDRLEN, len, &off);
350 * Returns the total length of a SLP header associated with the SLP
359 * the first short after the header for these functions. 'msg' points to
360 * the beginning of a SLP header.