aboutsummaryrefslogtreecommitdiff
path: root/mcast_image.h
diff options
context:
space:
mode:
authorDongsheng Yang <yangds.fnst@cn.fujitsu.com>2015-10-31 11:12:01 +0800
committerBrian Norris <computersforpeace@gmail.com>2015-11-11 14:38:40 -0800
commit7d81790ced345585b1e647ca9d0f6678e7062fa4 (patch)
tree02f61270c7a0fff7bb6b2e28f247a3d2fd6ff490 /mcast_image.h
parent344753f2aacb94d98ce238f81fc4a4b6ef6adea9 (diff)
mtd-utils: Restructure the mtd-utils source.
* There is no code modification in this commit, only moving * the files to proper place. The user tools looks a little messy as we place almost the all tools in the root directory of mtd-utils. To make it more clear, I propose to introduce the following structure for our source code. mtd-utils/ |-- lib |-- include |-- misc-utils |-- jffsX-utils |-- nand-utils |-- nor-utils |-- ubi-utils |-- ubifs-utils `-- tests Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'mcast_image.h')
-rw-r--r--mcast_image.h54
1 files changed, 0 insertions, 54 deletions
diff --git a/mcast_image.h b/mcast_image.h
deleted file mode 100644
index 8e94ffa..0000000
--- a/mcast_image.h
+++ /dev/null
@@ -1,54 +0,0 @@
-#include <stdint.h>
-
-#define PKT_SIZE 2820
-
-struct image_pkt_hdr {
- uint32_t resend;
- uint32_t totcrc;
- uint32_t nr_blocks;
- uint32_t blocksize;
- uint32_t block_crc;
- uint32_t block_nr;
- uint32_t pkt_sequence;
- uint16_t pkt_nr;
- uint16_t nr_pkts;
- uint32_t thislen;
- uint32_t thiscrc;
-};
-
-struct image_pkt {
- struct image_pkt_hdr hdr;
- unsigned char data[PKT_SIZE];
-};
-
-struct fec_parms;
-
-/* k - number of actual data packets
- * n - total number of packets including data and redundant packets
- * (actual packet size isn't relevant here) */
-struct fec_parms *fec_new(int k, int n);
-void fec_free(struct fec_parms *p);
-
-/* src - array of (n) pointers to data packets
- * fec - buffer for packet to be generated
- * index - index of packet to be generated (0 <= index < n)
- * sz - data packet size
- *
- * _linear version just takes a pointer to the raw data; no
- * mucking about with packet pointers.
- */
-void fec_encode(struct fec_parms *code, unsigned char *src[],
- unsigned char *fec, int index, int sz);
-void fec_encode_linear(struct fec_parms *code, unsigned char *src,
- unsigned char *fec, int index, int sz);
-
-/* data - array of (k) pointers to data packets, in arbitrary order (see i)
- * i - indices of (data) packets
- * sz - data packet size
- *
- * Will never fail as long as you give it (k) individual data packets.
- * Will re-order the (data) pointers but not the indices -- data packets
- * are ordered on return.
- */
-int fec_decode(struct fec_parms *code, unsigned char *data[],
- int i[], int sz);