/* $Id: mcl_lib_api_alc.h,v 1.6 2003/10/27 09:55:47 roca Exp $ */ /* * Copyright (c) 1999-2003 INRIA - 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_LIB_API_ALC_H /* { */ #define MCL_LIB_API_ALC_H /* * MCL API definition, part II: the reliable multicast specific part of * the MCL API. * * WARNING: This file must not be included by an application, only file: * src/common/mcl_lib_api.h * must be included! */ #if 0 // not yet enum mcl_tx_profile { MCL_TX_PROFILE_LOW_RATE_INTERNET = 0, /* modem connection */ MCL_TX_PROFILE_MID_RATE_INTERNET, /* eg with VPNs, xDSL */ MCL_TX_PROFILE_HIGH_SPEED_INTERNET, /* several Mbps connection */ MCL_TX_PROFILE_HIGH_SPEED_LAN, /* fast/Gbps ethernet LAN */ }; #endif /* * for mcl_wait_event... */ #define MCL_WAIT_EVENT_END_TX 0 #define MCL_WAIT_EVENT_END_RX 1 #define MCL_WAIT_EVENT_CLOSED 2 /* * library options set with the mcl_ctl() function */ enum mcl_opt { /* * common options used by both sender and receiver */ #define MCL_OPT_LEVEL MCL_OPT_LAYER_NB /* synonymous (deprecated) */ MCL_OPT_LAYER_NB = 1, /* number of transmission layers (AKA levels) */ /* argument: int */ MCL_OPT_SINGLE_LAYER, /* optimize transmissions for single layer, */ /* fixed rate, non congestion-control case */ /* argument: int (0 (default) or 1) */ MCL_OPT_PORT, /* port number (uni or multicast), HOST order*/ /* argument: int (and not ushort!) */ MCL_OPT_ADDR, /* address (uni or multicast), HOST order */ /* argument: int */ MCL_OPT_BIND, /* specify sockaddr struct, NETWORK byte order*/ /* argument: struct sockaddr_in */ MCL_OPT_TTL, /* specify TTL (time to live) in [0;127] range*/ /* argument: int */ MCL_OPT_DEMUX_LABEL, /* specify the LCT demultiplexing label */ /* argument: int */ MCL_OPT_STATS, /* collect various stats */ /* argument: int */ MCL_OPT_VERBOSITY, /* verbosity level */ /* argument: int */ MCL_OPT_DEBUG, /* no tx/rx thread to simplify debug */ /* argument: none */ MCL_OPT_MOREABOUT, /* version # and credits */ /* argument: none */ MCL_OPT_TMP_DIR, /* put temporary files in this directory */ /* argument: a `\0' terminated string, size */ /* given */ #define DEL_MODE_PUSH 0 /* tx once, assumes synchronized rx */ #define DEL_MODE_ON_DEMAND 1 /* tx cyclically, rx start at any time*/ #define DEL_MODE_STREAMING 2 /* streaming mode */ MCL_OPT_DELIVERY_MODE, /* specify the delivery mode: push/on-demand */ /* (cf. i-draft) argument: int */ /* two multicast specific socket options - rarely required... */ MCL_OPT_NETIF, /* specify network interface to be used */ /* HOST order; argument: int */ MCL_OPT_LOOPBACK, /* will we send mcast packet to local apps */ /* argument: int passed to setsockopt as is */ /* * options used by the sender */ MCL_OPT_SET_NEXT_TOI, /* set the Transport Object Id (AKA ADU id) */ /* to use for the next object submitted */ /* argument: int (must be >= 0) */ #define MCL_TX_PROFILE_LOW_RATE_INTERNET 0 /* modem to 2Mbps connections */ #define MCL_TX_PROFILE_MID_RATE_INTERNET 1 /* eg with VPNs, xDSL */ #define MCL_TX_PROFILE_HIGH_SPEED_INTERNET 2 /* eg for fast/Gbps ethernet */ #define MCL_TX_PROFILE_HIGH_SPEED_LAN 3 /* eg for fast/Gbps ethernet */ MCL_OPT_TX_PROFILE, /* select a pre-defined transmission profile */ /* argument: int */ MCL_OPT_DATAGRAM_SIZE, /* datagram size */ /* argument: int */ MCL_OPT_TX_RATE, /* tx rate in full-sz packets/s on base layer */ /* argument: int */ MCL_OPT_FEC_RATIO, /* set the FEC packets ratio (n/k) (e.g. 2.0 */ /* adds 100% of fec pkts, 3.0 adds 200% fec) */ /* argument: float (must be >= 1.0) */ MCL_OPT_NB_OF_TX, /* send DUs that number of times on each layer*/ /* argument: int (default 1 or infinity if */ /* in DEL_MODE_ON_DEMAND mode) */ MCL_OPT_REUSE_APPLI_TX_BUFFER, /* can MCL take control of appli buffer*/ /* used to avoid an extra copy within MCL */ /* Warning: buf must be alloc by c/re/malloc */ /* argument: int (0 (default) or 1) */ MCL_OPT_VIRTUAL_TX_MEMORY, /* do you need the virtual tx mem service? */ /* argmument: int (0 or 1 (default)) */ MCL_OPT_VIRTUAL_RX_MEMORY, /* do you need the virtual rx mem service? */ /* argmument: int (0 or 1 (default)) */ MCL_OPT_KEEP_DATA, /* step1: wait before doing ADU scheduling */ /* no argument */ MCL_OPT_PUSH_DATA, /* step2: now perform ADU scheduling and send */ /* no argument */ MCL_OPT_RESET_TRANSMISSIONS, /* delete and free all transmission */ /* tables and the ADU list */ /* no argument */ #ifdef STREAM MCL_OPT_GET_RX_LEVEL, /*return reception level*/ MCL_BASE_VIDEO_LAYER, /*MCL session is used for base video layer*/ #endif #define MCL_SCHED_LCT1 0 /* see mcl_profile.h for descr. */ #define MCL_SCHED_LCT2 1 /* see mcl_profile.h for descr. */ #define MCL_SCHED_LCT3 2 /* see mcl_profile.h for descr. */ #define MCL_SCHED_NB 3 /* nb of schedulers defined */ MCL_OPT_SCHED, /* choose a scheduler from above possibilities*/ /* argument: int */ #define MCL_SCHED_SEQUENTIAL_OBJ_ORDER 0 /* tx ADUs in sequence */ #define MCL_SCHED_RANDOM_OBJ_ORDER 1 /* tx ADUs in random order in each */ /* layer */ #define MCL_SCHED_PARTIALLY_MIXED_ORDER 2 /* mix partially all DUs of all ADUs*/ #define MCL_SCHED_MIXED_ORDER 3 /* mix all DUs of all ADUs */ MCL_OPT_OBJ_SCHED, /* choose an object scheduler */ /* argument: int */ #define MCL_FEC_CODE_NULL 0 /* null code (i.e. no FEC encoding) */ #define MCL_FEC_CODE_RSE 1 /* Reed-Solomon erasure FEC code */ #define MCL_FEC_CODE_LDGM 2 /* Low Density Generator Matrix-Staircase */ #define MCL_FEC_CODE_LDPC 3 /* Low Density Parity Check */ #define MCL_FEC_CODE_MAX_NB 4 /* Max number of FEC codes available */ MCL_OPT_SET_FEC_CODE, /* set the FEC codec to be used. If not */ /* available, an error is returned */ /* argument: int */ MCL_OPT_GET_MAX_BLOCK_SIZE_FOR_CURRENT_FEC, /* retrieve the maximum */ /* block size in bytes for current FEC code */ /* argument: int, contains the value on return*/ /* * FLUTE specific options at a sender */ MCL_OPT_NO_NONEWADU, /* prevents sender of sending sig NONEWADU*/ /* * options used by the receiver */ MCL_OPT_SRC_ADDR, /* (unicast) source address, HOST order, only */ /* needed at a receiver. */ /* argument: int */ MCL_OPT_IMMEDIATE_DELIVERY, /* boolean specifying if ADU can be */ /* delivered in arrival order or not */ /* argument: int (0 (default) or 1) */ MCL_OPT_POSTPONE_FEC_DECODING, /* boolean: is FEC decoding postponed? */ /* only valid with RSE, doesn't apply to LDPC */ /* argument: int, 0 or 1 (default, postponed) */ MCL_OPT_NEVER_LEAVE_BASE_LAYER, /* mcl_wait(MCL_WAIT_EVENT_CLOSED) */ /* needs it; argument: int (0 (default) or 1) */ /* * FLUTE specific options at a receiver */ MCL_OPT_FLUTE_DELIVERY, /* Set the FLUTE mode. This mode only keeps */ /* and delivers the ADUs explicitely */ /* identified with DELIVER_THIS_ADU or all of */ /* them if DELIVER_ALL_ADU has been set. All */ /* other ADUs are destroyed. ADU TOI==0 (FDT) */ /* is always distributed */ /* no argument */ MCL_OPT_FLUTE_DELIVER_THIS_ADU,/* Specifies an ADU TOI to deliver in */ /* MCL_OPT_FLUTE_DELIVERY mode, other TOIs */ /* (!=0) won't be delivered by default */ /* argument: int (TOI of the desired ADU) */ MCL_OPT_FLUTE_DELIVER_ALL_ADU,/* Deliver all ADUs */ /* no argument */ /* * options used by rlc_ctl() for RLC congestion control init * (rarely required... use default values) */ RLC_OPT_SP_CYCLE, /* interval between 2 SPs at layer 0 (in µsec)*/ /* argument: int */ RLC_OPT_PKT_TIMEOUT, /* Time To Wait for a late packet to arrive */ /* before assuming it's lost */ /* argument: int */ RLC_OPT_DEAF_PERIOD, /* Deaf period after dropping a layer */ /* argument: int */ RLC_OPT_LATE_ACCEPTED, /* number of late packets accepted between */ /* 2 SPs at highest layer */ /* argument: int */ RLC_OPT_LOSS_ACCEPTED, /* number of lost packets accepted between */ /* 2 SPs at highest layer */ /* argument: int */ RLC_OPT_LOSS_LIMIT, /* loss limit before layer drop */ /* argument: int */ RLC_OPT_LOSS_TIMEOUT, /* timeout for loss limit */ /* argument: int */ RLC_OPT_AGGRESSIVE_CC, /* boolean: 1 for an aggressive RLC profile, */ /* more tolerant to packet losses than default*/ /* argument: int (0 or 1) */ /* * options used by FLIDs_ctl() for FLID-SL congestion control init * (rarely required... use default values) */ FLIDS_OPT_TSD, /* TimeSlot Duration (in µsec) */ /* argument: int */ FLIDS_OPT_DEAF_PERIOD /* Duration of Deaf period in multiple of TSD */ /* argument: int */ }; #endif /* } MCL_LIB_API_ALC */