]> git.baikalelectronics.ru Git - kernel.git/commit
MPILIB: Provide a function to read raw data into an MPI
authorDavid Howells <dhowells@redhat.com>
Mon, 24 Sep 2012 16:11:27 +0000 (17:11 +0100)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 8 Oct 2012 03:20:21 +0000 (13:50 +1030)
commit162cca233f808a71cc45510bb4b2519d3d6622c0
treeca0e00fcd4502cb66df19f4e1aecbb1b4544908c
parent24892fe3a0b112ae430529ef8ec2569df74258b1
MPILIB: Provide a function to read raw data into an MPI

Provide a function to read raw data of a predetermined size into an MPI rather
than expecting the size to be encoded within the data.  The data is assumed to
represent an unsigned integer, and the resulting MPI will be positive.

The function looks like this:

MPI mpi_read_raw_data(const void *, size_t);

This is useful for reading ASN.1 integer primitives where the length is encoded
in the ASN.1 metadata.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
include/linux/mpi.h
lib/mpi/mpicoder.c