padding_encoding.h File Reference

Content padding. More...

#include "flute_defines.h"
#include "../alclib/defines.h"

Include dependency graph for padding_encoding.h:

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

Go to the source code of this file.


int compute_padding_length (unsigned long long f_size, int block_len, int es_len)
int padding_decoder (char *file_name, unsigned long long content_length)

Detailed Description

Content padding.

2007/02/28 08:58:01

MAD-FLUTELIB: Implementation of FLUTE protocol. Copyright (c) 2003-2007 TUT - Tampere University of Technology main authors/contacts: and

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

In addition, as a special exception, TUT - Tampere University of Technology gives permission to link the code of this program with the OpenSSL library (or with modified versions of OpenSSL that use the same license as OpenSSL), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than OpenSSL. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.

Definition in file padding_encoding.h.

Function Documentation

int compute_padding_length ( unsigned long long  f_size,
int  block_len,
int  es_len 

This function calculates the amount of needed padding.

f_size the size of the file to be padded
block_len number of encoding symbols per block
es_len encoding symbol length in bytes
the amount of needed padding in bytes, 0 when padding is not needed

Definition at line 49 of file padding_encoding.c.

Referenced by encode_directory(), and encode_file().

Here is the caller graph for this function:

int padding_decoder ( char *  file_name,
unsigned long long  content_length 

This function removes padding from the given file and renames file (removes ~pad extension).

file_name name of the file to be "unpadded"
content_length length of the file to be "unpadded"
0 in success, -1 otherwise

Definition at line 65 of file padding_encoding.c.

References PAD_SUFFIX.

Referenced by fdtbasedrecv(), name_incomplete_objects(), and recvfile().

Here is the caller graph for this function:

Generated on Fri Mar 9 20:08:57 2007 for MAD-FCL by  doxygen 1.5.0