linux/net/6lowpan/nhc_udp.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *	6LoWPAN IPv6 UDP compression according to RFC6282
 *
 *	Authors:
 *	Alexander Aring	<[email protected]>
 *
 *	Original written by:
 *	Alexander Smirnov <[email protected]>
 *	Jon Smirl <[email protected]>
 */

#include "nhc.h"

#define LOWPAN_NHC_UDP_MASK
#define LOWPAN_NHC_UDP_ID

#define LOWPAN_NHC_UDP_4BIT_PORT
#define LOWPAN_NHC_UDP_4BIT_MASK
#define LOWPAN_NHC_UDP_8BIT_PORT
#define LOWPAN_NHC_UDP_8BIT_MASK

/* values for port compression, _with checksum_ ie bit 5 set to 0 */

/* all inline */
#define LOWPAN_NHC_UDP_CS_P_00
/* source 16bit inline, dest = 0xF0 + 8 bit inline */
#define LOWPAN_NHC_UDP_CS_P_01
/* source = 0xF0 + 8bit inline, dest = 16 bit inline */
#define LOWPAN_NHC_UDP_CS_P_10
/* source & dest = 0xF0B + 4bit inline */
#define LOWPAN_NHC_UDP_CS_P_11
/* checksum elided */
#define LOWPAN_NHC_UDP_CS_C

static int udp_uncompress(struct sk_buff *skb, size_t needed)
{}

static int udp_compress(struct sk_buff *skb, u8 **hc_ptr)
{}

LOWPAN_NHC(nhc_udp, "RFC6282 UDP", NEXTHDR_UDP, sizeof(struct udphdr),
	   LOWPAN_NHC_UDP_ID, LOWPAN_NHC_UDP_MASK, udp_uncompress, udp_compress);

module_lowpan_nhc();
MODULE_DESCRIPTION();
MODULE_LICENSE();