rxrpc.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /* AF_RXRPC parameters
  2. *
  3. * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
  4. * Written by David Howells (dhowells@redhat.com)
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public License
  8. * as published by the Free Software Foundation; either version
  9. * 2 of the License, or (at your option) any later version.
  10. */
  11. #ifndef _LINUX_RXRPC_H
  12. #define _LINUX_RXRPC_H
  13. #include <linux/in.h>
  14. #include <linux/in6.h>
  15. /*
  16. * RxRPC socket address
  17. */
  18. struct sockaddr_rxrpc {
  19. sa_family_t srx_family; /* address family */
  20. u16 srx_service; /* service desired */
  21. u16 transport_type; /* type of transport socket (SOCK_DGRAM) */
  22. u16 transport_len; /* length of transport address */
  23. union {
  24. sa_family_t family; /* transport address family */
  25. struct sockaddr_in sin; /* IPv4 transport address */
  26. struct sockaddr_in6 sin6; /* IPv6 transport address */
  27. } transport;
  28. };
  29. /*
  30. * RxRPC socket options
  31. */
  32. #define RXRPC_SECURITY_KEY 1 /* [clnt] set client security key */
  33. #define RXRPC_SECURITY_KEYRING 2 /* [srvr] set ring of server security keys */
  34. #define RXRPC_EXCLUSIVE_CONNECTION 3 /* [clnt] use exclusive RxRPC connection */
  35. #define RXRPC_MIN_SECURITY_LEVEL 4 /* minimum security level */
  36. /*
  37. * RxRPC control messages
  38. * - terminal messages mean that a user call ID tag can be recycled
  39. */
  40. #define RXRPC_USER_CALL_ID 1 /* user call ID specifier */
  41. #define RXRPC_ABORT 2 /* abort request / notification [terminal] */
  42. #define RXRPC_ACK 3 /* [Server] RPC op final ACK received [terminal] */
  43. #define RXRPC_NET_ERROR 5 /* network error received [terminal] */
  44. #define RXRPC_BUSY 6 /* server busy received [terminal] */
  45. #define RXRPC_LOCAL_ERROR 7 /* local error generated [terminal] */
  46. #define RXRPC_NEW_CALL 8 /* [Server] new incoming call notification */
  47. #define RXRPC_ACCEPT 9 /* [Server] accept request */
  48. /*
  49. * RxRPC security levels
  50. */
  51. #define RXRPC_SECURITY_PLAIN 0 /* plain secure-checksummed packets only */
  52. #define RXRPC_SECURITY_AUTH 1 /* authenticated packets */
  53. #define RXRPC_SECURITY_ENCRYPT 2 /* encrypted packets */
  54. /*
  55. * RxRPC security indices
  56. */
  57. #define RXRPC_SECURITY_NONE 0 /* no security protocol */
  58. #define RXRPC_SECURITY_RXKAD 2 /* kaserver or kerberos 4 */
  59. #define RXRPC_SECURITY_RXGK 4 /* gssapi-based */
  60. #define RXRPC_SECURITY_RXK5 5 /* kerberos 5 */
  61. #endif /* _LINUX_RXRPC_H */