/* SPDX-License-Identifier: GPL-2.0-or-later */ /* packet.h: Rx packet layout and definitions * * Copyright (C) 2002, 2007 Red Hat, Inc. All Rights Reserved. * Written by David Howells ([email protected]) */ #ifndef _LINUX_RXRPC_PACKET_H #define _LINUX_RXRPC_PACKET_H rxrpc_seq_t; /* Rx message sequence number */ rxrpc_serial_t; /* Rx message serial number */ rxrpc_seq_net_t; /* on-the-wire Rx message sequence number */ rxrpc_serial_net_t; /* on-the-wire Rx message serial number */ /*****************************************************************************/ /* * on-the-wire Rx packet header * - all multibyte fields should be in network byte order */ struct rxrpc_wire_header { … } __packed; /*****************************************************************************/ /* * jumbo packet secondary header * - can be mapped to read header by: * - new_serial = serial + 1 * - new_seq = seq + 1 * - new_flags = j_flags * - new__rsvd = j__rsvd * - duplicating all other fields */ struct rxrpc_jumbo_header { … } __packed; #define RXRPC_JUMBO_DATALEN … #define RXRPC_JUMBO_SUBPKTLEN … /* * The maximum number of subpackets that can possibly fit in a UDP packet is: * * ((max_IP - IP_hdr - UDP_hdr) / RXRPC_JUMBO_SUBPKTLEN) + 1 * = ((65535 - 28 - 28) / 1416) + 1 * = 46 non-terminal packets and 1 terminal packet. */ #define RXRPC_MAX_NR_JUMBO … /*****************************************************************************/ /* * on-the-wire Rx ACK packet data payload * - all multibyte fields should be in network byte order */ struct rxrpc_ackpacket { … } __packed; /* * ACK packets can have a further piece of information tagged on the end */ struct rxrpc_acktrailer { … }; /*****************************************************************************/ /* * Kerberos security type-2 challenge packet */ struct rxkad_challenge { … } __packed; /*****************************************************************************/ /* * Kerberos security type-2 response packet */ struct rxkad_response { … } __packed; #endif /* _LINUX_RXRPC_PACKET_H */