ucspi-ssl
0.99e
TLS encryption for IPv6 communication
ucspi-ssl-0.99e
src
uint16_unpack.c
Go to the documentation of this file.
1
#include "
uint16.h
"
2
3
void
uint16_unpack
(
const
char
s[2],
uint16
*u)
4
{
5
uint16
result;
6
7
result = (
unsigned
char) s[1];
8
result <<= 8;
9
result += (
unsigned
char) s[0];
10
11
*u = result;
12
}
13
14
void
uint16_unpack_big
(
const
char
s[2],
uint16
*u)
15
{
16
uint16
result;
17
18
result = (
unsigned
char) s[0];
19
result <<= 8;
20
result += (
unsigned
char) s[1];
21
22
*u = result;
23
}
uint16_unpack
void uint16_unpack(const char s[2], uint16 *u)
Definition:
uint16_unpack.c:3
uint16_unpack_big
void uint16_unpack_big(const char s[2], uint16 *u)
Definition:
uint16_unpack.c:14
uint16.h
uint16
unsigned short uint16
Definition:
uint16.h:4
Generated on Wed Jul 11 2018 22:50:46 for ucspi-ssl by
1.8.13