liberasurecode  1.6.1
Erasure Code API library
null_code.c
Go to the documentation of this file.
1 /*
2  * <Copyright>
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions are met:
6  *
7  * Redistributions of source code must retain the above copyright notice, this
8  * list of conditions and the following disclaimer.
9  *
10  * Redistributions in binary form must reproduce the above copyright notice, this
11  * list of conditions and the following disclaimer in the documentation and/or
12  * other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY
13  * THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
14  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
15  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
16  * EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
17  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
18  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
20  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
21  * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
22  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23  *
24  * null EC backend
25  *
26  * vi: set noai tw=79 ts=4 sw=4:
27  */
28 
29 #include <stdlib.h>
30 #include <stdint.h>
31 
32 /* calls required for init */
33 void* null_code_init(int k, int m, int hd)
34 {
35  /* add your code here */
36  return NULL;
37 }
38 
39 /* calls required for encode */
40 int null_code_encode(void *code_desc, char **data, char **parity,
41  int blocksize)
42 {
43  /* add your code here */
44  return 0;
45 }
46 
47 /* calls required for decode */
48 int null_code_decode(void *code_desc, char **data, char **parity,
49  int *missing_idxs, int blocksize, int decode_parity)
50 {
51  /* add your code here */
52  return 0;
53 }
54 
55 /* calls required for reconstruct */
56 int null_reconstruct(char **available_fragments, int num_fragments,
57  uint64_t fragment_len, int destination_idx, char* out_fragment)
58 {
59  /* add your code here */
60  return 0;
61 }
62 
63 /* set of fragments needed to reconstruct at a minimum */
64 int null_code_fragments_needed(void *code_desc, int *missing_idxs,
65  int *fragments_needed)
66 {
67  /* add your code here */
68  return 0;
69 }
70 
int null_code_fragments_needed(void *code_desc, int *missing_idxs, int *fragments_needed)
Definition: null_code.c:64
void * null_code_init(int k, int m, int hd)
Definition: null_code.c:33
int null_reconstruct(char **available_fragments, int num_fragments, uint64_t fragment_len, int destination_idx, char *out_fragment)
Definition: null_code.c:56
int null_code_decode(void *code_desc, char **data, char **parity, int *missing_idxs, int blocksize, int decode_parity)
Definition: null_code.c:48
int null_code_encode(void *code_desc, char **data, char **parity, int blocksize)
Definition: null_code.c:40