Extended Attribute Data Type Conventions

Extended attributes (EAs) can contain any type of data. So that applications can understand the type of information stored in an EA, the first WORD of EA data must specify one of the following data types:

Extended Attribute Data Types

┌───────────────┬──────┬────────────────────────────────────────┐
│Data Type      │Value │Description                             │
├───────────────┼──────┼────────────────────────────────────────┤
│EAT_BINARY     │FFFE  │Binary (non-text) data; the first WORD  │
│               │      │following the data type specifies the   │
│               │      │length of the data.                     │
├───────────────┼──────┼────────────────────────────────────────┤
│EAT_ASCII      │FFFD  │ASCII text; the first WORD following the│
│               │      │data type specifies the length of the   │
│               │      │data.                                   │
├───────────────┼──────┼────────────────────────────────────────┤
│EAT_BITMAP     │FFFB  │Bit map data; the first WORD following  │
│               │      │the data type specifies the length of   │
│               │      │the data.                               │
├───────────────┼──────┼────────────────────────────────────────┤
│EAT_METAFILE   │FFFA  │Metafile data; the first WORD following │
│               │      │the data type specifies the length of   │
│               │      │the data.                               │
├───────────────┼──────┼────────────────────────────────────────┤
│EAT_ICON       │FFF9  │Icon data; the first WORD following the │
│               │      │data type specifies the length of the   │
│               │      │data.                                   │
├───────────────┼──────┼────────────────────────────────────────┤
│EAT_EA         │FFEE  │ASCII name of another EA that is        │
│               │      │associated with the file. The contents  │
│               │      │of that EA are to be included into the  │
│               │      │current EA. The first WORD following the│
│               │      │data type specifies the length of the   │
│               │      │data.                                   │
├───────────────┼──────┼────────────────────────────────────────┤
│EAT_MVMT       │FFDF  │Multi-Valued, Multi-Typed data-two or   │
│               │      │more consecutive extended attribute     │
│               │      │values. Each value has an explicitly    │
│               │      │specified type.                         │
├───────────────┼──────┼────────────────────────────────────────┤
│EAT_MVST       │FFDE  │Multi-Valued, Single-Typed data-two or  │
│               │      │more consecutive extended attribute     │
│               │      │values. All values have the same type.  │
├───────────────┼──────┼────────────────────────────────────────┤
│EAT_ASN1       │FFDD  │ASN.1 field data; an ISO standard for   │
│               │      │describing multivalue data streams.     │
└───────────────┴──────┴────────────────────────────────────────┘
Values of hex 8000 and up are reserved. Values between hex 0000 and hex 7FFF can be defined by the user.

Symbolic constants are defined in BSEDOS.H and BSEDOS.INC.

In all cases, the length specifies the number of bytes of data. Other values for data types, in the range hex 0000 through hex 7FFF, can be used for user-defined extended attributes.

All user-defined data types should be length-preceded, meaning that a WORD indicating the length of the data (in bytes) precedes the data.

For example, here is how to represent the string "Hello":

    EAT_ASCII    0005    Hello


[Back: About Extended Attributes]
[Next: Multi-Value Data Type Fields]