fec.h File Reference

Forward error correction based on Vandermonde matrices
980624
(C) 1997-98 Luigi Rizzo (luigi@iet.unipi.it). More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define GF_BITS   8
#define GF_SIZE   ((1 << GF_BITS) - 1)

Functions

void fec_free (void *p)
void * fec_new (int k, int n)
void init_fec (void)
void fec_encode (void *code, void **src, void *dst, int index, int sz)
int fec_decode (void *code, void **pkt, int index[], int sz)


Detailed Description

Forward error correction based on Vandermonde matrices
980624
(C) 1997-98 Luigi Rizzo (luigi@iet.unipi.it).

Author
peltotal
Date
2006/11/07 19:36:19
Revision
1.11

Portions derived from code by Phil Karn (karn@ka9q.ampr.org), Robert Morelos-Zaragoza (robert@spectra.eng.hawaii.edu) and Hari Thirumoorthy (harit@spectra.eng.hawaii.edu), Aug 1995

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition in file fec.h.


Define Documentation

#define GF_BITS   8

Definition at line 41 of file fec.h.

Referenced by decode_fdt_payload(), encode_directory(), encode_file(), fec_decode(), fec_encode(), generate_fdt(), generate_gf(), modnn(), and send_unit().

#define GF_SIZE   ((1 << GF_BITS) - 1)

Definition at line 42 of file fec.h.

Referenced by fec_new(), generate_gf(), init_mul_table(), modnn(), rs_fec_decode_src_block(), and rs_fec_encode_src_block().


Function Documentation

int fec_decode ( void *  code,
void **  pkt,
int  index[],
int  sz 
)

Definition at line 882 of file fec.c.

References addmul, bcopy, build_decode_matrix(), bzero, GF_BITS, fec_parms::k, my_malloc(), and shuffle().

Referenced by rs_fec_decode_src_block().

Here is the call graph for this function:

Here is the caller graph for this function:

void fec_encode ( void *  code,
void **  src,
void *  dst,
int  index,
int  sz 
)

Definition at line 760 of file fec.c.

References addmul, bcopy, bzero, fec_parms::enc_matrix, GF_BITS, fec_parms::k, and fec_parms::n.

Referenced by rs_fec_encode_src_block().

Here is the caller graph for this function:

void fec_free ( void *  p  ) 

Definition at line 663 of file fec.c.

References fec_parms::enc_matrix, FEC_MAGIC, fec_parms::k, fec_parms::magic, and fec_parms::n.

Referenced by rs_fec_decode_src_block(), and rs_fec_encode_src_block().

Here is the caller graph for this function:

void* fec_new ( int  k,
int  n 
)

Definition at line 689 of file fec.c.

References bzero, DDB, DEB, fec_parms::enc_matrix, FEC_MAGIC, gf_exp, GF_SIZE, init_fec(), invert_vdm(), fec_parms::k, fec_parms::magic, matmul(), modnn(), my_malloc(), fec_parms::n, NEW_GF_MATRIX, TICK, and TOCK.

Referenced by rs_fec_decode_src_block(), and rs_fec_encode_src_block().

Here is the call graph for this function:

Here is the caller graph for this function:

void init_fec ( void   ) 

Definition at line 633 of file fec.c.

References DDB, generate_gf(), init_mul_table(), TICK, and TOCK.

Referenced by fec_new().

Here is the call graph for this function:

Here is the caller graph for this function:


Generated on Fri Mar 9 20:01:00 2007 for MAD-FCL by  doxygen 1.5.0