1 /* SPDX-License-Identifier: GPL-2.0-or-later W 1 2 /* Types and definitions for AF_RXRPC. 3 * 4 * Copyright (C) 2007 Red Hat, Inc. All Rights 5 * Written by David Howells (dhowells@redhat.c 6 */ 7 8 #ifndef _UAPI_LINUX_RXRPC_H 9 #define _UAPI_LINUX_RXRPC_H 10 11 #include <linux/types.h> 12 #include <linux/in.h> 13 #include <linux/in6.h> 14 15 /* 16 * RxRPC socket address 17 */ 18 struct sockaddr_rxrpc { 19 __kernel_sa_family_t srx_family; 20 __u16 srx_service; 21 __u16 transport_type 22 __u16 transport_len; 23 union { 24 __kernel_sa_family_t family; 25 struct sockaddr_in sin; 26 struct sockaddr_in6 sin6; 27 } transport; 28 }; 29 30 /* 31 * RxRPC socket options 32 */ 33 #define RXRPC_SECURITY_KEY 1 34 #define RXRPC_SECURITY_KEYRING 2 35 #define RXRPC_EXCLUSIVE_CONNECTION 3 36 #define RXRPC_MIN_SECURITY_LEVEL 4 37 #define RXRPC_UPGRADEABLE_SERVICE 5 38 #define RXRPC_SUPPORTED_CMSG 6 39 40 /* 41 * RxRPC control messages 42 * - If neither abort or accept are specified, 43 * - terminal messages mean that a user call I 44 * - s/r/- indicate whether these are applicab 45 */ 46 enum rxrpc_cmsg_type { 47 RXRPC_USER_CALL_ID = 1, /* sr: 48 RXRPC_ABORT = 2, /* sr: 49 RXRPC_ACK = 3, /* -r: 50 RXRPC_NET_ERROR = 5, /* -r: 51 RXRPC_BUSY = 6, /* -r: 52 RXRPC_LOCAL_ERROR = 7, /* -r: 53 RXRPC_NEW_CALL = 8, /* -r: 54 RXRPC_EXCLUSIVE_CALL = 10, /* s-: 55 RXRPC_UPGRADE_SERVICE = 11, /* s-: 56 RXRPC_TX_LENGTH = 12, /* s-: 57 RXRPC_SET_CALL_TIMEOUT = 13, /* s-: 58 RXRPC_CHARGE_ACCEPT = 14, /* s-: 59 RXRPC__SUPPORTED 60 }; 61 62 /* 63 * RxRPC security levels 64 */ 65 #define RXRPC_SECURITY_PLAIN 0 /* pla 66 #define RXRPC_SECURITY_AUTH 1 /* aut 67 #define RXRPC_SECURITY_ENCRYPT 2 /* enc 68 69 /* 70 * RxRPC security indices 71 */ 72 #define RXRPC_SECURITY_NONE 0 /* no 73 #define RXRPC_SECURITY_RXKAD 2 /* kas 74 #define RXRPC_SECURITY_RXGK 4 /* gss 75 #define RXRPC_SECURITY_RXK5 5 /* ker 76 77 /* 78 * RxRPC-level abort codes 79 */ 80 #define RX_CALL_DEAD -1 /* cal 81 #define RX_INVALID_OPERATION -2 /* inv 82 #define RX_CALL_TIMEOUT -3 /* cal 83 #define RX_EOF -4 /* une 84 #define RX_PROTOCOL_ERROR -5 /* low 85 #define RX_USER_ABORT -6 /* gen 86 #define RX_ADDRINUSE -7 /* UDP 87 #define RX_DEBUGI_BADTYPE -8 /* bad 88 89 /* 90 * (un)marshalling abort codes (rxgen) 91 */ 92 #define RXGEN_CC_MARSHAL -450 93 #define RXGEN_CC_UNMARSHAL -451 94 #define RXGEN_SS_MARSHAL -452 95 #define RXGEN_SS_UNMARSHAL -453 96 #define RXGEN_DECODE -454 97 #define RXGEN_OPCODE -455 98 #define RXGEN_SS_XDRFREE -456 99 #define RXGEN_CC_XDRFREE -457 100 101 /* 102 * Rx kerberos security abort codes 103 * - unfortunately we have no generalised secu 104 * like "unsupported security", so we have t 105 * other side understands 106 */ 107 #define RXKADINCONSISTENCY 19270400 108 #define RXKADPACKETSHORT 19270401 109 #define RXKADLEVELFAIL 19270402 110 #define RXKADTICKETLEN 19270403 111 #define RXKADOUTOFSEQUENCE 19270404 112 #define RXKADNOAUTH 19270405 113 #define RXKADBADKEY 19270406 114 #define RXKADBADTICKET 19270407 115 #define RXKADUNKNOWNKEY 19270408 116 #define RXKADEXPIRED 19270409 117 #define RXKADSEALEDINCON 19270410 118 #define RXKADDATALEN 19270411 119 #define RXKADILLEGALLEVEL 19270412 120 121 #endif /* _UAPI_LINUX_RXRPC_H */ 122
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.