/* $Id: mcl_lct_hdr.h,v 1.4 2003/10/10 08:54:46 roca Exp $ */ /* * Copyright (c) 1999-2003 INRIA - Universite Paris 6 - All rights reserved * (main author: Vincent Roca - vincent.roca@inrialpes.fr) * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. */ #ifndef MCL_LCT_HDR_H /* { */ #define MCL_LCT_HDR_H #define LCT_VERSION 1 #define CC_ID_RLC 1 /* * structure used for communications between the various header * creation/analysis functions and the rest of the code */ typedef struct hdr_infos { /* common fields */ u_int32_t demux_label; /* demux label, also known as TSI */ u_int32_t fec_encoding_id;/* FEC encoding ID (RFC3452) */ /* fields used by FPI */ bool FPI_present; /* rx only: FEC payload ID present */ u_int32_t idf_adu; /* ADU identifier */ u_int32_t idf_block; /* BLOCK identifier */ u_int32_t idf_du; /* DU identifier */ bool is_fec; /* true if DU has FEC content */ /* fields used by FEC object Tx Info (FTI) */ bool FTI_present; /* tx or rx: FTI present */ bool FDT_present; /* tx or rx: FDT present */ u_int32_t FDT_instanceid; u_int32_t adu_len; /* ADU length in bytes */ u_int32_t k; /* full-sized src blk length in */ /* number of symbols */ u_int16_t symbol_len; /* full-sized symbol length in bytes */ u_int16_t fec_instance_id;/* FEC instance ID (RFC3452) */ #ifdef LDPC_FEC u_int16_t fec_key; /* LDGM/LDPC specific: random seed */ u_int32_t n; /* LDGM/LDPC specific: n parameter */ #endif /* fields used by NONEWADU */ bool NONEWADU_present;/* tx or rx: NONEWADU present */ u_int32_t max_idf_adu; /* highest ADU identifier in session */ /* fields used by CLOSE */ u_int32_t close; /* CLOSE sig: boolean */ } hdr_infos_t; /* * LCT header format */ typedef struct fixed_lct_hdr { #ifdef _BIT_FIELDS_LTOH u_int16_t flag_b:1, flag_a:1, flag_r:1, flag_t:1, flag_h:1, flag_o:2, flag_s:1, reserved:2, flag_c:2, version:4; u_char hdr_len; u_char codepoint; #else /* the sames, in "natural" writting order... */ u_int16_t version:4, /* LCT version Number */ flag_c:2, /* congestion control flag */ reserved:2, /* unused; must be zero */ flag_s:1, /* transport session identifier flag */ flag_o:2, /* transport object identifier flag */ flag_h:1, /* half word flag */ flag_t:1, /* Sender Current Time (SCT) present */ flag_r:1, /* Expected Residual Time ERT present */ flag_a:1, /* close object flag */ flag_b:1; /* close session flag */ u_char hdr_len; /* length of variable portion of LCT */ /* header in units of 32-bit words */ /* (starting from 3rd 32-bit word) */ u_char codepoint; /* opaque idf used by payload decoder */ #endif u_int32_t cci; /* opaque congestion control header */ } fixed_lct_hdr_t; /* types of signaling */ #define EH_SIG 2 /* ALC/LCT signaling */ /* ... others... */ /* * Extension Headers (EH) types */ /* official EH defined by LCT */ #define EXT_NOP 0 #define EXT_AUTH 1 /* official ALC-specific EH */ #define EXT_FTI 64 /* FEC Object Transmission Information */ /* private EH (not in LCT/ALC drafts) */ #define SIG_NONEWADU 65 /* no new adu will be submitted by the appli */ #define SIG_CLOSE 66 /* end of tx */ #define EXT_FDT 192 /* FDT Instance Header */ #endif /* } MCL_LCT_HDR_H */