GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  STRUCTS_FIXEDDATA_TYPE (3)

NAME

STRUCTS_DATA_TYPE, STRUCTS_FIXEDDATA_TYPE - structs types for binary data

CONTENTS

Library
Synopsis
Description
See Also
History
Authors

LIBRARY

PDEL Library (libpdel, -lpdel)

SYNOPSIS


.In sys/types.h
.In pdel/structs/structs.h
.In pdel/structs/type/data.h STRUCTS_DATA_TYPE charset mtype STRUCTS_FIXEDDATA_TYPE length
.Vt extern const struct structs_type structs_type_data ;
.Vt extern const struct structs_type structs_type_hexdata ;

DESCRIPTION

The STRUCTS_DATA_TYPE and STRUCTS_FIXEDDATA_TYPE macros define a structs(3) type (i.e., a struct structs_type) for describing variable and fixed length binary data, respectively.

For STRUCTS_DATA_TYPE, the described data structure must be a struct structs_data:

    struct structs_data {
        u_int   length;       /* number of bytes */
        u_char  *data;        /* bytes */
    };

The length field contains the number of bytes in the sequence. The data itself is pointed to by data. mtype is the typed_mem(3) type used to dynamically allocate the buffer pointed to by data. The ASCII form of the data is a base-64 encoding using the character set specified by charset, or the default charset if charset is NULL. See base64(3) for the definition of a valid character set. As a special case, if charset is the empty string, then a straight hex encoding will be used. This results in a longer but more human readable encoding.

STRUCTS_FIXEDDATA_TYPE defines a structs type for a binary sequence having fixed length length. The described data structure is an array of length u_char. The ASCII form is a straight hexadecimal encoding.

Two variable length types are predefined. structs_type_data uses the default RFC 2045 character set and structs_type_hexdata uses hexadecimal encoding for the ASCII expression. Both of these types use the typed_mem(3) type STRUCTS_DATA_MEMTYPE, defined in the header file.

SEE ALSO

base64(3), libpdel(3), structs(3), structs_type(3), typed_mem(3)

HISTORY

The PDEL library was developed at Packet Design, LLC. http://www.packetdesign.com/

AUTHORS


.An Archie Cobbs Aq archie@freebsd.org
Search for    or go to Top of page |  Section 3 |  Main Index


Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.