diff options
Diffstat (limited to 'include/uapi/linux')
27 files changed, 1675 insertions, 278 deletions
diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild index 5c8a1d25e21c..ab5d4992e568 100644 --- a/include/uapi/linux/Kbuild +++ b/include/uapi/linux/Kbuild | |||
| @@ -285,6 +285,7 @@ header-y += nvram.h | |||
| 285 | header-y += omap3isp.h | 285 | header-y += omap3isp.h |
| 286 | header-y += omapfb.h | 286 | header-y += omapfb.h |
| 287 | header-y += oom.h | 287 | header-y += oom.h |
| 288 | header-y += openvswitch.h | ||
| 288 | header-y += packet_diag.h | 289 | header-y += packet_diag.h |
| 289 | header-y += param.h | 290 | header-y += param.h |
| 290 | header-y += parport.h | 291 | header-y += parport.h |
| @@ -331,6 +332,7 @@ header-y += rtnetlink.h | |||
| 331 | header-y += scc.h | 332 | header-y += scc.h |
| 332 | header-y += sched.h | 333 | header-y += sched.h |
| 333 | header-y += screen_info.h | 334 | header-y += screen_info.h |
| 335 | header-y += sctp.h | ||
| 334 | header-y += sdla.h | 336 | header-y += sdla.h |
| 335 | header-y += seccomp.h | 337 | header-y += seccomp.h |
| 336 | header-y += securebits.h | 338 | header-y += securebits.h |
diff --git a/include/uapi/linux/acct.h b/include/uapi/linux/acct.h index 11b6ca3e0873..df2f9a0bba6a 100644 --- a/include/uapi/linux/acct.h +++ b/include/uapi/linux/acct.h | |||
| @@ -107,10 +107,12 @@ struct acct_v3 | |||
| 107 | #define ACORE 0x08 /* ... dumped core */ | 107 | #define ACORE 0x08 /* ... dumped core */ |
| 108 | #define AXSIG 0x10 /* ... was killed by a signal */ | 108 | #define AXSIG 0x10 /* ... was killed by a signal */ |
| 109 | 109 | ||
| 110 | #ifdef __BIG_ENDIAN | 110 | #if defined(__BYTE_ORDER) ? __BYTE_ORDER == __BIG_ENDIAN : defined(__BIG_ENDIAN) |
| 111 | #define ACCT_BYTEORDER 0x80 /* accounting file is big endian */ | 111 | #define ACCT_BYTEORDER 0x80 /* accounting file is big endian */ |
| 112 | #else | 112 | #elif defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : defined(__LITTLE_ENDIAN) |
| 113 | #define ACCT_BYTEORDER 0x00 /* accounting file is little endian */ | 113 | #define ACCT_BYTEORDER 0x00 /* accounting file is little endian */ |
| 114 | #else | ||
| 115 | #error unspecified endianness | ||
| 114 | #endif | 116 | #endif |
| 115 | 117 | ||
| 116 | #ifndef __KERNEL__ | 118 | #ifndef __KERNEL__ |
diff --git a/include/uapi/linux/aio_abi.h b/include/uapi/linux/aio_abi.h index 86fa7a71336a..bb2554f7fbd1 100644 --- a/include/uapi/linux/aio_abi.h +++ b/include/uapi/linux/aio_abi.h | |||
| @@ -62,9 +62,9 @@ struct io_event { | |||
| 62 | __s64 res2; /* secondary result */ | 62 | __s64 res2; /* secondary result */ |
| 63 | }; | 63 | }; |
| 64 | 64 | ||
| 65 | #if defined(__LITTLE_ENDIAN) | 65 | #if defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : defined(__LITTLE_ENDIAN) |
| 66 | #define PADDED(x,y) x, y | 66 | #define PADDED(x,y) x, y |
| 67 | #elif defined(__BIG_ENDIAN) | 67 | #elif defined(__BYTE_ORDER) ? __BYTE_ORDER == __BIG_ENDIAN : defined(__BIG_ENDIAN) |
| 68 | #define PADDED(x,y) y, x | 68 | #define PADDED(x,y) y, x |
| 69 | #else | 69 | #else |
| 70 | #error edit for your odd byteorder. | 70 | #error edit for your odd byteorder. |
diff --git a/include/uapi/linux/caif/caif_socket.h b/include/uapi/linux/caif/caif_socket.h index 3f3bac6af7bc..586e9f98184f 100644 --- a/include/uapi/linux/caif/caif_socket.h +++ b/include/uapi/linux/caif/caif_socket.h | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* linux/caif_socket.h | 1 | /* linux/caif_socket.h |
| 2 | * CAIF Definitions for CAIF socket and network layer | 2 | * CAIF Definitions for CAIF socket and network layer |
| 3 | * Copyright (C) ST-Ericsson AB 2010 | 3 | * Copyright (C) ST-Ericsson AB 2010 |
| 4 | * Author: Sjur Brendeland/ sjur.brandeland@stericsson.com | 4 | * Author: Sjur Brendeland |
| 5 | * License terms: GNU General Public License (GPL) version 2 | 5 | * License terms: GNU General Public License (GPL) version 2 |
| 6 | */ | 6 | */ |
| 7 | 7 | ||
diff --git a/include/uapi/linux/caif/if_caif.h b/include/uapi/linux/caif/if_caif.h index 5e7eed4edf51..7618aabe8c6b 100644 --- a/include/uapi/linux/caif/if_caif.h +++ b/include/uapi/linux/caif/if_caif.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (C) ST-Ericsson AB 2010 | 2 | * Copyright (C) ST-Ericsson AB 2010 |
| 3 | * Author: Sjur Brendeland/ sjur.brandeland@stericsson.com | 3 | * Author: Sjur Brendeland |
| 4 | * License terms: GNU General Public License (GPL) version 2 | 4 | * License terms: GNU General Public License (GPL) version 2 |
| 5 | */ | 5 | */ |
| 6 | 6 | ||
diff --git a/include/uapi/linux/cn_proc.h b/include/uapi/linux/cn_proc.h index 0d7b49973bb3..f6c271035bbd 100644 --- a/include/uapi/linux/cn_proc.h +++ b/include/uapi/linux/cn_proc.h | |||
| @@ -56,7 +56,9 @@ struct proc_event { | |||
| 56 | PROC_EVENT_PTRACE = 0x00000100, | 56 | PROC_EVENT_PTRACE = 0x00000100, |
| 57 | PROC_EVENT_COMM = 0x00000200, | 57 | PROC_EVENT_COMM = 0x00000200, |
| 58 | /* "next" should be 0x00000400 */ | 58 | /* "next" should be 0x00000400 */ |
| 59 | /* "last" is the last process event: exit */ | 59 | /* "last" is the last process event: exit, |
| 60 | * while "next to last" is coredumping event */ | ||
| 61 | PROC_EVENT_COREDUMP = 0x40000000, | ||
| 60 | PROC_EVENT_EXIT = 0x80000000 | 62 | PROC_EVENT_EXIT = 0x80000000 |
| 61 | } what; | 63 | } what; |
| 62 | __u32 cpu; | 64 | __u32 cpu; |
| @@ -110,11 +112,17 @@ struct proc_event { | |||
| 110 | char comm[16]; | 112 | char comm[16]; |
| 111 | } comm; | 113 | } comm; |
| 112 | 114 | ||
| 115 | struct coredump_proc_event { | ||
| 116 | __kernel_pid_t process_pid; | ||
| 117 | __kernel_pid_t process_tgid; | ||
| 118 | } coredump; | ||
| 119 | |||
| 113 | struct exit_proc_event { | 120 | struct exit_proc_event { |
| 114 | __kernel_pid_t process_pid; | 121 | __kernel_pid_t process_pid; |
| 115 | __kernel_pid_t process_tgid; | 122 | __kernel_pid_t process_tgid; |
| 116 | __u32 exit_code, exit_signal; | 123 | __u32 exit_code, exit_signal; |
| 117 | } exit; | 124 | } exit; |
| 125 | |||
| 118 | } event_data; | 126 | } event_data; |
| 119 | }; | 127 | }; |
| 120 | 128 | ||
diff --git a/include/uapi/linux/filter.h b/include/uapi/linux/filter.h index 9cfde6941099..8eb9ccaa5b48 100644 --- a/include/uapi/linux/filter.h +++ b/include/uapi/linux/filter.h | |||
| @@ -129,7 +129,8 @@ struct sock_fprog { /* Required for SO_ATTACH_FILTER. */ | |||
| 129 | #define SKF_AD_ALU_XOR_X 40 | 129 | #define SKF_AD_ALU_XOR_X 40 |
| 130 | #define SKF_AD_VLAN_TAG 44 | 130 | #define SKF_AD_VLAN_TAG 44 |
| 131 | #define SKF_AD_VLAN_TAG_PRESENT 48 | 131 | #define SKF_AD_VLAN_TAG_PRESENT 48 |
| 132 | #define SKF_AD_MAX 52 | 132 | #define SKF_AD_PAY_OFFSET 52 |
| 133 | #define SKF_AD_MAX 56 | ||
| 133 | #define SKF_NET_OFF (-0x100000) | 134 | #define SKF_NET_OFF (-0x100000) |
| 134 | #define SKF_LL_OFF (-0x200000) | 135 | #define SKF_LL_OFF (-0x200000) |
| 135 | 136 | ||
diff --git a/include/uapi/linux/fuse.h b/include/uapi/linux/fuse.h index 4c43b4448792..706d035fa748 100644 --- a/include/uapi/linux/fuse.h +++ b/include/uapi/linux/fuse.h | |||
| @@ -95,15 +95,10 @@ | |||
| 95 | #ifndef _LINUX_FUSE_H | 95 | #ifndef _LINUX_FUSE_H |
| 96 | #define _LINUX_FUSE_H | 96 | #define _LINUX_FUSE_H |
| 97 | 97 | ||
| 98 | #ifdef __linux__ | 98 | #ifdef __KERNEL__ |
| 99 | #include <linux/types.h> | 99 | #include <linux/types.h> |
| 100 | #else | 100 | #else |
| 101 | #include <stdint.h> | 101 | #include <stdint.h> |
| 102 | #define __u64 uint64_t | ||
| 103 | #define __s64 int64_t | ||
| 104 | #define __u32 uint32_t | ||
| 105 | #define __s32 int32_t | ||
| 106 | #define __u16 uint16_t | ||
| 107 | #endif | 102 | #endif |
| 108 | 103 | ||
| 109 | /* | 104 | /* |
| @@ -139,42 +134,42 @@ | |||
| 139 | userspace works under 64bit kernels */ | 134 | userspace works under 64bit kernels */ |
| 140 | 135 | ||
| 141 | struct fuse_attr { | 136 | struct fuse_attr { |
| 142 | __u64 ino; | 137 | uint64_t ino; |
| 143 | __u64 size; | 138 | uint64_t size; |
| 144 | __u64 blocks; | 139 | uint64_t blocks; |
| 145 | __u64 atime; | 140 | uint64_t atime; |
| 146 | __u64 mtime; | 141 | uint64_t mtime; |
| 147 | __u64 ctime; | 142 | uint64_t ctime; |
| 148 | __u32 atimensec; | 143 | uint32_t atimensec; |
| 149 | __u32 mtimensec; | 144 | uint32_t mtimensec; |
| 150 | __u32 ctimensec; | 145 | uint32_t ctimensec; |
| 151 | __u32 mode; | 146 | uint32_t mode; |
| 152 | __u32 nlink; | 147 | uint32_t nlink; |
| 153 | __u32 uid; | 148 | uint32_t uid; |
| 154 | __u32 gid; | 149 | uint32_t gid; |
| 155 | __u32 rdev; | 150 | uint32_t rdev; |
| 156 | __u32 blksize; | 151 | uint32_t blksize; |
| 157 | __u32 padding; | 152 | uint32_t padding; |
| 158 | }; | 153 | }; |
| 159 | 154 | ||
| 160 | struct fuse_kstatfs { | 155 | struct fuse_kstatfs { |
| 161 | __u64 blocks; | 156 | uint64_t blocks; |
| 162 | __u64 bfree; | 157 | uint64_t bfree; |
| 163 | __u64 bavail; | 158 | uint64_t bavail; |
| 164 | __u64 files; | 159 | uint64_t files; |
| 165 | __u64 ffree; | 160 | uint64_t ffree; |
| 166 | __u32 bsize; | 161 | uint32_t bsize; |
| 167 | __u32 namelen; | 162 | uint32_t namelen; |
| 168 | __u32 frsize; | 163 | uint32_t frsize; |
| 169 | __u32 padding; | 164 | uint32_t padding; |
| 170 | __u32 spare[6]; | 165 | uint32_t spare[6]; |
| 171 | }; | 166 | }; |
| 172 | 167 | ||
| 173 | struct fuse_file_lock { | 168 | struct fuse_file_lock { |
| 174 | __u64 start; | 169 | uint64_t start; |
| 175 | __u64 end; | 170 | uint64_t end; |
| 176 | __u32 type; | 171 | uint32_t type; |
| 177 | __u32 pid; /* tgid */ | 172 | uint32_t pid; /* tgid */ |
| 178 | }; | 173 | }; |
| 179 | 174 | ||
| 180 | /** | 175 | /** |
| @@ -364,143 +359,143 @@ enum fuse_notify_code { | |||
| 364 | #define FUSE_COMPAT_ENTRY_OUT_SIZE 120 | 359 | #define FUSE_COMPAT_ENTRY_OUT_SIZE 120 |
| 365 | 360 | ||
| 366 | struct fuse_entry_out { | 361 | struct fuse_entry_out { |
| 367 | __u64 nodeid; /* Inode ID */ | 362 | uint64_t nodeid; /* Inode ID */ |
| 368 | __u64 generation; /* Inode generation: nodeid:gen must | 363 | uint64_t generation; /* Inode generation: nodeid:gen must |
| 369 | be unique for the fs's lifetime */ | 364 | be unique for the fs's lifetime */ |
| 370 | __u64 entry_valid; /* Cache timeout for the name */ | 365 | uint64_t entry_valid; /* Cache timeout for the name */ |
| 371 | __u64 attr_valid; /* Cache timeout for the attributes */ | 366 | uint64_t attr_valid; /* Cache timeout for the attributes */ |
| 372 | __u32 entry_valid_nsec; | 367 | uint32_t entry_valid_nsec; |
| 373 | __u32 attr_valid_nsec; | 368 | uint32_t attr_valid_nsec; |
| 374 | struct fuse_attr attr; | 369 | struct fuse_attr attr; |
| 375 | }; | 370 | }; |
| 376 | 371 | ||
| 377 | struct fuse_forget_in { | 372 | struct fuse_forget_in { |
| 378 | __u64 nlookup; | 373 | uint64_t nlookup; |
| 379 | }; | 374 | }; |
| 380 | 375 | ||
| 381 | struct fuse_forget_one { | 376 | struct fuse_forget_one { |
| 382 | __u64 nodeid; | 377 | uint64_t nodeid; |
| 383 | __u64 nlookup; | 378 | uint64_t nlookup; |
| 384 | }; | 379 | }; |
| 385 | 380 | ||
| 386 | struct fuse_batch_forget_in { | 381 | struct fuse_batch_forget_in { |
| 387 | __u32 count; | 382 | uint32_t count; |
| 388 | __u32 dummy; | 383 | uint32_t dummy; |
| 389 | }; | 384 | }; |
| 390 | 385 | ||
| 391 | struct fuse_getattr_in { | 386 | struct fuse_getattr_in { |
| 392 | __u32 getattr_flags; | 387 | uint32_t getattr_flags; |
| 393 | __u32 dummy; | 388 | uint32_t dummy; |
| 394 | __u64 fh; | 389 | uint64_t fh; |
| 395 | }; | 390 | }; |
| 396 | 391 | ||
| 397 | #define FUSE_COMPAT_ATTR_OUT_SIZE 96 | 392 | #define FUSE_COMPAT_ATTR_OUT_SIZE 96 |
| 398 | 393 | ||
| 399 | struct fuse_attr_out { | 394 | struct fuse_attr_out { |
| 400 | __u64 attr_valid; /* Cache timeout for the attributes */ | 395 | uint64_t attr_valid; /* Cache timeout for the attributes */ |
| 401 | __u32 attr_valid_nsec; | 396 | uint32_t attr_valid_nsec; |
| 402 | __u32 dummy; | 397 | uint32_t dummy; |
| 403 | struct fuse_attr attr; | 398 | struct fuse_attr attr; |
| 404 | }; | 399 | }; |
| 405 | 400 | ||
| 406 | #define FUSE_COMPAT_MKNOD_IN_SIZE 8 | 401 | #define FUSE_COMPAT_MKNOD_IN_SIZE 8 |
| 407 | 402 | ||
| 408 | struct fuse_mknod_in { | 403 | struct fuse_mknod_in { |
| 409 | __u32 mode; | 404 | uint32_t mode; |
| 410 | __u32 rdev; | 405 | uint32_t rdev; |
| 411 | __u32 umask; | 406 | uint32_t umask; |
| 412 | __u32 padding; | 407 | uint32_t padding; |
| 413 | }; | 408 | }; |
| 414 | 409 | ||
| 415 | struct fuse_mkdir_in { | 410 | struct fuse_mkdir_in { |
| 416 | __u32 mode; | 411 | uint32_t mode; |
| 417 | __u32 umask; | 412 | uint32_t umask; |
| 418 | }; | 413 | }; |
| 419 | 414 | ||
| 420 | struct fuse_rename_in { | 415 | struct fuse_rename_in { |
| 421 | __u64 newdir; | 416 | uint64_t newdir; |
| 422 | }; | 417 | }; |
| 423 | 418 | ||
| 424 | struct fuse_link_in { | 419 | struct fuse_link_in { |
| 425 | __u64 oldnodeid; | 420 | uint64_t oldnodeid; |
| 426 | }; | 421 | }; |
| 427 | 422 | ||
| 428 | struct fuse_setattr_in { | 423 | struct fuse_setattr_in { |
| 429 | __u32 valid; | 424 | uint32_t valid; |
| 430 | __u32 padding; | 425 | uint32_t padding; |
| 431 | __u64 fh; | 426 | uint64_t fh; |
| 432 | __u64 size; | 427 | uint64_t size; |
| 433 | __u64 lock_owner; | 428 | uint64_t lock_owner; |
| 434 | __u64 atime; | 429 | uint64_t atime; |
| 435 | __u64 mtime; | 430 | uint64_t mtime; |
| 436 | __u64 unused2; | 431 | uint64_t unused2; |
| 437 | __u32 atimensec; | 432 | uint32_t atimensec; |
| 438 | __u32 mtimensec; | 433 | uint32_t mtimensec; |
| 439 | __u32 unused3; | 434 | uint32_t unused3; |
| 440 | __u32 mode; | 435 | uint32_t mode; |
| 441 | __u32 unused4; | 436 | uint32_t unused4; |
| 442 | __u32 uid; | 437 | uint32_t uid; |
| 443 | __u32 gid; | 438 | uint32_t gid; |
| 444 | __u32 unused5; | 439 | uint32_t unused5; |
| 445 | }; | 440 | }; |
| 446 | 441 | ||
| 447 | struct fuse_open_in { | 442 | struct fuse_open_in { |
| 448 | __u32 flags; | 443 | uint32_t flags; |
| 449 | __u32 unused; | 444 | uint32_t unused; |
| 450 | }; | 445 | }; |
| 451 | 446 | ||
| 452 | struct fuse_create_in { | 447 | struct fuse_create_in { |
| 453 | __u32 flags; | 448 | uint32_t flags; |
| 454 | __u32 mode; | 449 | uint32_t mode; |
| 455 | __u32 umask; | 450 | uint32_t umask; |
| 456 | __u32 padding; | 451 | uint32_t padding; |
| 457 | }; | 452 | }; |
| 458 | 453 | ||
| 459 | struct fuse_open_out { | 454 | struct fuse_open_out { |
| 460 | __u64 fh; | 455 | uint64_t fh; |
| 461 | __u32 open_flags; | 456 | uint32_t open_flags; |
| 462 | __u32 padding; | 457 | uint32_t padding; |
| 463 | }; | 458 | }; |
| 464 | 459 | ||
| 465 | struct fuse_release_in { | 460 | struct fuse_release_in { |
| 466 | __u64 fh; | 461 | uint64_t fh; |
| 467 | __u32 flags; | 462 | uint32_t flags; |
| 468 | __u32 release_flags; | 463 | uint32_t release_flags; |
| 469 | __u64 lock_owner; | 464 | uint64_t lock_owner; |
| 470 | }; | 465 | }; |
| 471 | 466 | ||
| 472 | struct fuse_flush_in { | 467 | struct fuse_flush_in { |
| 473 | __u64 fh; | 468 | uint64_t fh; |
| 474 | __u32 unused; | 469 | uint32_t unused; |
| 475 | __u32 padding; | 470 | uint32_t padding; |
| 476 | __u64 lock_owner; | 471 | uint64_t lock_owner; |
| 477 | }; | 472 | }; |
| 478 | 473 | ||
| 479 | struct fuse_read_in { | 474 | struct fuse_read_in { |
| 480 | __u64 fh; | 475 | uint64_t fh; |
| 481 | __u64 offset; | 476 | uint64_t offset; |
| 482 | __u32 size; | 477 | uint32_t size; |
| 483 | __u32 read_flags; | 478 | uint32_t read_flags; |
| 484 | __u64 lock_owner; | 479 | uint64_t lock_owner; |
| 485 | __u32 flags; | 480 | uint32_t flags; |
| 486 | __u32 padding; | 481 | uint32_t padding; |
| 487 | }; | 482 | }; |
| 488 | 483 | ||
| 489 | #define FUSE_COMPAT_WRITE_IN_SIZE 24 | 484 | #define FUSE_COMPAT_WRITE_IN_SIZE 24 |
| 490 | 485 | ||
| 491 | struct fuse_write_in { | 486 | struct fuse_write_in { |
| 492 | __u64 fh; | 487 | uint64_t fh; |
| 493 | __u64 offset; | 488 | uint64_t offset; |
| 494 | __u32 size; | 489 | uint32_t size; |
| 495 | __u32 write_flags; | 490 | uint32_t write_flags; |
| 496 | __u64 lock_owner; | 491 | uint64_t lock_owner; |
| 497 | __u32 flags; | 492 | uint32_t flags; |
| 498 | __u32 padding; | 493 | uint32_t padding; |
| 499 | }; | 494 | }; |
| 500 | 495 | ||
| 501 | struct fuse_write_out { | 496 | struct fuse_write_out { |
| 502 | __u32 size; | 497 | uint32_t size; |
| 503 | __u32 padding; | 498 | uint32_t padding; |
| 504 | }; | 499 | }; |
| 505 | 500 | ||
| 506 | #define FUSE_COMPAT_STATFS_SIZE 48 | 501 | #define FUSE_COMPAT_STATFS_SIZE 48 |
| @@ -510,32 +505,32 @@ struct fuse_statfs_out { | |||
| 510 | }; | 505 | }; |
| 511 | 506 | ||
| 512 | struct fuse_fsync_in { | 507 | struct fuse_fsync_in { |
| 513 | __u64 fh; | 508 | uint64_t fh; |
| 514 | __u32 fsync_flags; | 509 | uint32_t fsync_flags; |
| 515 | __u32 padding; | 510 | uint32_t padding; |
| 516 | }; | 511 | }; |
| 517 | 512 | ||
| 518 | struct fuse_setxattr_in { | 513 | struct fuse_setxattr_in { |
| 519 | __u32 size; | 514 | uint32_t size; |
| 520 | __u32 flags; | 515 | uint32_t flags; |
| 521 | }; | 516 | }; |
| 522 | 517 | ||
| 523 | struct fuse_getxattr_in { | 518 | struct fuse_getxattr_in { |
| 524 | __u32 size; | 519 | uint32_t size; |
| 525 | __u32 padding; | 520 | uint32_t padding; |
| 526 | }; | 521 | }; |
| 527 | 522 | ||
| 528 | struct fuse_getxattr_out { | 523 | struct fuse_getxattr_out { |
| 529 | __u32 size; | 524 | uint32_t size; |
| 530 | __u32 padding; | 525 | uint32_t padding; |
| 531 | }; | 526 | }; |
| 532 | 527 | ||
| 533 | struct fuse_lk_in { | 528 | struct fuse_lk_in { |
| 534 | __u64 fh; | 529 | uint64_t fh; |
| 535 | __u64 owner; | 530 | uint64_t owner; |
| 536 | struct fuse_file_lock lk; | 531 | struct fuse_file_lock lk; |
| 537 | __u32 lk_flags; | 532 | uint32_t lk_flags; |
| 538 | __u32 padding; | 533 | uint32_t padding; |
| 539 | }; | 534 | }; |
| 540 | 535 | ||
| 541 | struct fuse_lk_out { | 536 | struct fuse_lk_out { |
| @@ -543,134 +538,135 @@ struct fuse_lk_out { | |||
| 543 | }; | 538 | }; |
| 544 | 539 | ||
| 545 | struct fuse_access_in { | 540 | struct fuse_access_in { |
| 546 | __u32 mask; | 541 | uint32_t mask; |
| 547 | __u32 padding; | 542 | uint32_t padding; |
| 548 | }; | 543 | }; |
| 549 | 544 | ||
| 550 | struct fuse_init_in { | 545 | struct fuse_init_in { |
| 551 | __u32 major; | 546 | uint32_t major; |
| 552 | __u32 minor; | 547 | uint32_t minor; |
| 553 | __u32 max_readahead; | 548 | uint32_t max_readahead; |
| 554 | __u32 flags; | 549 | uint32_t flags; |
| 555 | }; | 550 | }; |
| 556 | 551 | ||
| 557 | struct fuse_init_out { | 552 | struct fuse_init_out { |
| 558 | __u32 major; | 553 | uint32_t major; |
| 559 | __u32 minor; | 554 | uint32_t minor; |
| 560 | __u32 max_readahead; | 555 | uint32_t max_readahead; |
| 561 | __u32 flags; | 556 | uint32_t flags; |
| 562 | __u16 max_background; | 557 | uint16_t max_background; |
| 563 | __u16 congestion_threshold; | 558 | uint16_t congestion_threshold; |
| 564 | __u32 max_write; | 559 | uint32_t max_write; |
| 565 | }; | 560 | }; |
| 566 | 561 | ||
| 567 | #define CUSE_INIT_INFO_MAX 4096 | 562 | #define CUSE_INIT_INFO_MAX 4096 |
| 568 | 563 | ||
| 569 | struct cuse_init_in { | 564 | struct cuse_init_in { |
| 570 | __u32 major; | 565 | uint32_t major; |
| 571 | __u32 minor; | 566 | uint32_t minor; |
| 572 | __u32 unused; | 567 | uint32_t unused; |
| 573 | __u32 flags; | 568 | uint32_t flags; |
| 574 | }; | 569 | }; |
| 575 | 570 | ||
| 576 | struct cuse_init_out { | 571 | struct cuse_init_out { |
| 577 | __u32 major; | 572 | uint32_t major; |
| 578 | __u32 minor; | 573 | uint32_t minor; |
| 579 | __u32 unused; | 574 | uint32_t unused; |
| 580 | __u32 flags; | 575 | uint32_t flags; |
| 581 | __u32 max_read; | 576 | uint32_t max_read; |
| 582 | __u32 max_write; | 577 | uint32_t max_write; |
| 583 | __u32 dev_major; /* chardev major */ | 578 | uint32_t dev_major; /* chardev major */ |
| 584 | __u32 dev_minor; /* chardev minor */ | 579 | uint32_t dev_minor; /* chardev minor */ |
| 585 | __u32 spare[10]; | 580 | uint32_t spare[10]; |
| 586 | }; | 581 | }; |
| 587 | 582 | ||
| 588 | struct fuse_interrupt_in { | 583 | struct fuse_interrupt_in { |
| 589 | __u64 unique; | 584 | uint64_t unique; |
| 590 | }; | 585 | }; |
| 591 | 586 | ||
| 592 | struct fuse_bmap_in { | 587 | struct fuse_bmap_in { |
| 593 | __u64 block; | 588 | uint64_t block; |
| 594 | __u32 blocksize; | 589 | uint32_t blocksize; |
| 595 | __u32 padding; | 590 | uint32_t padding; |
| 596 | }; | 591 | }; |
| 597 | 592 | ||
| 598 | struct fuse_bmap_out { | 593 | struct fuse_bmap_out { |
| 599 | __u64 block; | 594 | uint64_t block; |
| 600 | }; | 595 | }; |
| 601 | 596 | ||
| 602 | struct fuse_ioctl_in { | 597 | struct fuse_ioctl_in { |
| 603 | __u64 fh; | 598 | uint64_t fh; |
| 604 | __u32 flags; | 599 | uint32_t flags; |
| 605 | __u32 cmd; | 600 | uint32_t cmd; |
| 606 | __u64 arg; | 601 | uint64_t arg; |
| 607 | __u32 in_size; | 602 | uint32_t in_size; |
| 608 | __u32 out_size; | 603 | uint32_t out_size; |
| 609 | }; | 604 | }; |
| 610 | 605 | ||
| 611 | struct fuse_ioctl_iovec { | 606 | struct fuse_ioctl_iovec { |
| 612 | __u64 base; | 607 | uint64_t base; |
| 613 | __u64 len; | 608 | uint64_t len; |
| 614 | }; | 609 | }; |
| 615 | 610 | ||
| 616 | struct fuse_ioctl_out { | 611 | struct fuse_ioctl_out { |
| 617 | __s32 result; | 612 | int32_t result; |
| 618 | __u32 flags; | 613 | uint32_t flags; |
| 619 | __u32 in_iovs; | 614 | uint32_t in_iovs; |
| 620 | __u32 out_iovs; | 615 | uint32_t out_iovs; |
| 621 | }; | 616 | }; |
| 622 | 617 | ||
| 623 | struct fuse_poll_in { | 618 | struct fuse_poll_in { |
| 624 | __u64 fh; | 619 | uint64_t fh; |
| 625 | __u64 kh; | 620 | uint64_t kh; |
| 626 | __u32 flags; | 621 | uint32_t flags; |
| 627 | __u32 events; | 622 | uint32_t events; |
| 628 | }; | 623 | }; |
| 629 | 624 | ||
| 630 | struct fuse_poll_out { | 625 | struct fuse_poll_out { |
| 631 | __u32 revents; | 626 | uint32_t revents; |
| 632 | __u32 padding; | 627 | uint32_t padding; |
| 633 | }; | 628 | }; |
| 634 | 629 | ||
| 635 | struct fuse_notify_poll_wakeup_out { | 630 | struct fuse_notify_poll_wakeup_out { |
| 636 | __u64 kh; | 631 | uint64_t kh; |
| 637 | }; | 632 | }; |
| 638 | 633 | ||
| 639 | struct fuse_fallocate_in { | 634 | struct fuse_fallocate_in { |
| 640 | __u64 fh; | 635 | uint64_t fh; |
| 641 | __u64 offset; | 636 | uint64_t offset; |
| 642 | __u64 length; | 637 | uint64_t length; |
| 643 | __u32 mode; | 638 | uint32_t mode; |
| 644 | __u32 padding; | 639 | uint32_t padding; |
| 645 | }; | 640 | }; |
| 646 | 641 | ||
| 647 | struct fuse_in_header { | 642 | struct fuse_in_header { |
| 648 | __u32 len; | 643 | uint32_t len; |
| 649 | __u32 opcode; | 644 | uint32_t opcode; |
| 650 | __u64 unique; | 645 | uint64_t unique; |
| 651 | __u64 nodeid; | 646 | uint64_t nodeid; |
| 652 | __u32 uid; | 647 | uint32_t uid; |
| 653 | __u32 gid; | 648 | uint32_t gid; |
| 654 | __u32 pid; | 649 | uint32_t pid; |
| 655 | __u32 padding; | 650 | uint32_t padding; |
| 656 | }; | 651 | }; |
| 657 | 652 | ||
| 658 | struct fuse_out_header { | 653 | struct fuse_out_header { |
| 659 | __u32 len; | 654 | uint32_t len; |
| 660 | __s32 error; | 655 | int32_t error; |
| 661 | __u64 unique; | 656 | uint64_t unique; |
| 662 | }; | 657 | }; |
| 663 | 658 | ||
| 664 | struct fuse_dirent { | 659 | struct fuse_dirent { |
| 665 | __u64 ino; | 660 | uint64_t ino; |
| 666 | __u64 off; | 661 | uint64_t off; |
| 667 | __u32 namelen; | 662 | uint32_t namelen; |
| 668 | __u32 type; | 663 | uint32_t type; |
| 669 | char name[]; | 664 | char name[]; |
| 670 | }; | 665 | }; |
| 671 | 666 | ||
| 672 | #define FUSE_NAME_OFFSET offsetof(struct fuse_dirent, name) | 667 | #define FUSE_NAME_OFFSET offsetof(struct fuse_dirent, name) |
| 673 | #define FUSE_DIRENT_ALIGN(x) (((x) + sizeof(__u64) - 1) & ~(sizeof(__u64) - 1)) | 668 | #define FUSE_DIRENT_ALIGN(x) \ |
| 669 | (((x) + sizeof(uint64_t) - 1) & ~(sizeof(uint64_t) - 1)) | ||
| 674 | #define FUSE_DIRENT_SIZE(d) \ | 670 | #define FUSE_DIRENT_SIZE(d) \ |
| 675 | FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET + (d)->namelen) | 671 | FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET + (d)->namelen) |
| 676 | 672 | ||
| @@ -685,47 +681,47 @@ struct fuse_direntplus { | |||
| 685 | FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET_DIRENTPLUS + (d)->dirent.namelen) | 681 | FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET_DIRENTPLUS + (d)->dirent.namelen) |
| 686 | 682 | ||
| 687 | struct fuse_notify_inval_inode_out { | 683 | struct fuse_notify_inval_inode_out { |
| 688 | __u64 ino; | 684 | uint64_t ino; |
| 689 | __s64 off; | 685 | int64_t off; |
| 690 | __s64 len; | 686 | int64_t len; |
| 691 | }; | 687 | }; |
| 692 | 688 | ||
| 693 | struct fuse_notify_inval_entry_out { | 689 | struct fuse_notify_inval_entry_out { |
| 694 | __u64 parent; | 690 | uint64_t parent; |
| 695 | __u32 namelen; | 691 | uint32_t namelen; |
| 696 | __u32 padding; | 692 | uint32_t padding; |
| 697 | }; | 693 | }; |
| 698 | 694 | ||
| 699 | struct fuse_notify_delete_out { | 695 | struct fuse_notify_delete_out { |
| 700 | __u64 parent; | 696 | uint64_t parent; |
| 701 | __u64 child; | 697 | uint64_t child; |
| 702 | __u32 namelen; | 698 | uint32_t namelen; |
| 703 | __u32 padding; | 699 | uint32_t padding; |
| 704 | }; | 700 | }; |
| 705 | 701 | ||
| 706 | struct fuse_notify_store_out { | 702 | struct fuse_notify_store_out { |
| 707 | __u64 nodeid; | 703 | uint64_t nodeid; |
| 708 | __u64 offset; | 704 | uint64_t offset; |
| 709 | __u32 size; | 705 | uint32_t size; |
| 710 | __u32 padding; | 706 | uint32_t padding; |
| 711 | }; | 707 | }; |
| 712 | 708 | ||
| 713 | struct fuse_notify_retrieve_out { | 709 | struct fuse_notify_retrieve_out { |
| 714 | __u64 notify_unique; | 710 | uint64_t notify_unique; |
| 715 | __u64 nodeid; | 711 | uint64_t nodeid; |
| 716 | __u64 offset; | 712 | uint64_t offset; |
| 717 | __u32 size; | 713 | uint32_t size; |
| 718 | __u32 padding; | 714 | uint32_t padding; |
| 719 | }; | 715 | }; |
| 720 | 716 | ||
| 721 | /* Matches the size of fuse_write_in */ | 717 | /* Matches the size of fuse_write_in */ |
| 722 | struct fuse_notify_retrieve_in { | 718 | struct fuse_notify_retrieve_in { |
| 723 | __u64 dummy1; | 719 | uint64_t dummy1; |
| 724 | __u64 offset; | 720 | uint64_t offset; |
| 725 | __u32 size; | 721 | uint32_t size; |
| 726 | __u32 dummy2; | 722 | uint32_t dummy2; |
| 727 | __u64 dummy3; | 723 | uint64_t dummy3; |
| 728 | __u64 dummy4; | 724 | uint64_t dummy4; |
| 729 | }; | 725 | }; |
| 730 | 726 | ||
| 731 | #endif /* _LINUX_FUSE_H */ | 727 | #endif /* _LINUX_FUSE_H */ |
diff --git a/include/uapi/linux/if_ether.h b/include/uapi/linux/if_ether.h index 798032d01112..ade07f1c491a 100644 --- a/include/uapi/linux/if_ether.h +++ b/include/uapi/linux/if_ether.h | |||
| @@ -94,6 +94,9 @@ | |||
| 94 | #define ETH_P_EDSA 0xDADA /* Ethertype DSA [ NOT AN OFFICIALLY REGISTERED ID ] */ | 94 | #define ETH_P_EDSA 0xDADA /* Ethertype DSA [ NOT AN OFFICIALLY REGISTERED ID ] */ |
| 95 | #define ETH_P_AF_IUCV 0xFBFB /* IBM af_iucv [ NOT AN OFFICIALLY REGISTERED ID ] */ | 95 | #define ETH_P_AF_IUCV 0xFBFB /* IBM af_iucv [ NOT AN OFFICIALLY REGISTERED ID ] */ |
| 96 | 96 | ||
| 97 | #define ETH_P_802_3_MIN 0x0600 /* If the value in the ethernet type is less than this value | ||
| 98 | * then the frame is Ethernet II. Else it is 802.3 */ | ||
| 99 | |||
| 97 | /* | 100 | /* |
| 98 | * Non DIX types. Won't clash for 1500 types. | 101 | * Non DIX types. Won't clash for 1500 types. |
| 99 | */ | 102 | */ |
diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h index c4edfe11f1f7..e3163544f339 100644 --- a/include/uapi/linux/if_link.h +++ b/include/uapi/linux/if_link.h | |||
| @@ -201,6 +201,7 @@ enum { | |||
| 201 | IFLA_INET6_MCAST, /* MC things. What of them? */ | 201 | IFLA_INET6_MCAST, /* MC things. What of them? */ |
| 202 | IFLA_INET6_CACHEINFO, /* time values and max reasm size */ | 202 | IFLA_INET6_CACHEINFO, /* time values and max reasm size */ |
| 203 | IFLA_INET6_ICMP6STATS, /* statistics (icmpv6) */ | 203 | IFLA_INET6_ICMP6STATS, /* statistics (icmpv6) */ |
| 204 | IFLA_INET6_TOKEN, /* device token */ | ||
| 204 | __IFLA_INET6_MAX | 205 | __IFLA_INET6_MAX |
| 205 | }; | 206 | }; |
| 206 | 207 | ||
| @@ -249,6 +250,7 @@ enum { | |||
| 249 | IFLA_VLAN_FLAGS, | 250 | IFLA_VLAN_FLAGS, |
| 250 | IFLA_VLAN_EGRESS_QOS, | 251 | IFLA_VLAN_EGRESS_QOS, |
| 251 | IFLA_VLAN_INGRESS_QOS, | 252 | IFLA_VLAN_INGRESS_QOS, |
| 253 | IFLA_VLAN_PROTOCOL, | ||
| 252 | __IFLA_VLAN_MAX, | 254 | __IFLA_VLAN_MAX, |
| 253 | }; | 255 | }; |
| 254 | 256 | ||
| @@ -295,7 +297,7 @@ enum macvlan_mode { | |||
| 295 | enum { | 297 | enum { |
| 296 | IFLA_VXLAN_UNSPEC, | 298 | IFLA_VXLAN_UNSPEC, |
| 297 | IFLA_VXLAN_ID, | 299 | IFLA_VXLAN_ID, |
| 298 | IFLA_VXLAN_GROUP, | 300 | IFLA_VXLAN_REMOTE, |
| 299 | IFLA_VXLAN_LINK, | 301 | IFLA_VXLAN_LINK, |
| 300 | IFLA_VXLAN_LOCAL, | 302 | IFLA_VXLAN_LOCAL, |
| 301 | IFLA_VXLAN_TTL, | 303 | IFLA_VXLAN_TTL, |
diff --git a/include/uapi/linux/if_packet.h b/include/uapi/linux/if_packet.h index f9a60375f0d0..8136658ea477 100644 --- a/include/uapi/linux/if_packet.h +++ b/include/uapi/linux/if_packet.h | |||
| @@ -55,6 +55,8 @@ struct sockaddr_ll { | |||
| 55 | #define PACKET_FANOUT_HASH 0 | 55 | #define PACKET_FANOUT_HASH 0 |
| 56 | #define PACKET_FANOUT_LB 1 | 56 | #define PACKET_FANOUT_LB 1 |
| 57 | #define PACKET_FANOUT_CPU 2 | 57 | #define PACKET_FANOUT_CPU 2 |
| 58 | #define PACKET_FANOUT_ROLLOVER 3 | ||
| 59 | #define PACKET_FANOUT_FLAG_ROLLOVER 0x1000 | ||
| 58 | #define PACKET_FANOUT_FLAG_DEFRAG 0x8000 | 60 | #define PACKET_FANOUT_FLAG_DEFRAG 0x8000 |
| 59 | 61 | ||
| 60 | struct tpacket_stats { | 62 | struct tpacket_stats { |
diff --git a/include/uapi/linux/neighbour.h b/include/uapi/linux/neighbour.h index adb068c53c4e..f175212420ab 100644 --- a/include/uapi/linux/neighbour.h +++ b/include/uapi/linux/neighbour.h | |||
| @@ -21,6 +21,9 @@ enum { | |||
| 21 | NDA_CACHEINFO, | 21 | NDA_CACHEINFO, |
| 22 | NDA_PROBES, | 22 | NDA_PROBES, |
| 23 | NDA_VLAN, | 23 | NDA_VLAN, |
| 24 | NDA_PORT, | ||
| 25 | NDA_VNI, | ||
| 26 | NDA_IFINDEX, | ||
| 24 | __NDA_MAX | 27 | __NDA_MAX |
| 25 | }; | 28 | }; |
| 26 | 29 | ||
diff --git a/include/uapi/linux/netfilter/xt_NFQUEUE.h b/include/uapi/linux/netfilter/xt_NFQUEUE.h index 9eafdbbb401c..8bb5fe657d34 100644 --- a/include/uapi/linux/netfilter/xt_NFQUEUE.h +++ b/include/uapi/linux/netfilter/xt_NFQUEUE.h | |||
| @@ -26,4 +26,13 @@ struct xt_NFQ_info_v2 { | |||
| 26 | __u16 bypass; | 26 | __u16 bypass; |
| 27 | }; | 27 | }; |
| 28 | 28 | ||
| 29 | struct xt_NFQ_info_v3 { | ||
| 30 | __u16 queuenum; | ||
| 31 | __u16 queues_total; | ||
| 32 | __u16 flags; | ||
| 33 | #define NFQ_FLAG_BYPASS 0x01 /* for compatibility with v2 */ | ||
| 34 | #define NFQ_FLAG_CPU_FANOUT 0x02 /* use current CPU (no hashing) */ | ||
| 35 | #define NFQ_FLAG_MASK 0x03 | ||
| 36 | }; | ||
| 37 | |||
| 29 | #endif /* _XT_NFQ_TARGET_H */ | 38 | #endif /* _XT_NFQ_TARGET_H */ |
diff --git a/include/uapi/linux/netfilter_ipv6/ip6t_frag.h b/include/uapi/linux/netfilter_ipv6/ip6t_frag.h index b47f61b9e082..dfd8bc2268cf 100644 --- a/include/uapi/linux/netfilter_ipv6/ip6t_frag.h +++ b/include/uapi/linux/netfilter_ipv6/ip6t_frag.h | |||
| @@ -4,9 +4,9 @@ | |||
| 4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
| 5 | 5 | ||
| 6 | struct ip6t_frag { | 6 | struct ip6t_frag { |
| 7 | __u32 ids[2]; /* Security Parameter Index */ | 7 | __u32 ids[2]; /* Identification range */ |
| 8 | __u32 hdrlen; /* Header Length */ | 8 | __u32 hdrlen; /* Header Length */ |
| 9 | __u8 flags; /* */ | 9 | __u8 flags; /* Flags */ |
| 10 | __u8 invflags; /* Inverse flags */ | 10 | __u8 invflags; /* Inverse flags */ |
| 11 | }; | 11 | }; |
| 12 | 12 | ||
diff --git a/include/uapi/linux/netlink.h b/include/uapi/linux/netlink.h index 78d5b8a546d6..1a85940f8ab7 100644 --- a/include/uapi/linux/netlink.h +++ b/include/uapi/linux/netlink.h | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | #ifndef _UAPI__LINUX_NETLINK_H | 1 | #ifndef _UAPI__LINUX_NETLINK_H |
| 2 | #define _UAPI__LINUX_NETLINK_H | 2 | #define _UAPI__LINUX_NETLINK_H |
| 3 | 3 | ||
| 4 | #include <linux/kernel.h> | ||
| 4 | #include <linux/socket.h> /* for __kernel_sa_family_t */ | 5 | #include <linux/socket.h> /* for __kernel_sa_family_t */ |
| 5 | #include <linux/types.h> | 6 | #include <linux/types.h> |
| 6 | 7 | ||
| @@ -78,7 +79,7 @@ struct nlmsghdr { | |||
| 78 | #define NLMSG_ALIGNTO 4U | 79 | #define NLMSG_ALIGNTO 4U |
| 79 | #define NLMSG_ALIGN(len) ( ((len)+NLMSG_ALIGNTO-1) & ~(NLMSG_ALIGNTO-1) ) | 80 | #define NLMSG_ALIGN(len) ( ((len)+NLMSG_ALIGNTO-1) & ~(NLMSG_ALIGNTO-1) ) |
| 80 | #define NLMSG_HDRLEN ((int) NLMSG_ALIGN(sizeof(struct nlmsghdr))) | 81 | #define NLMSG_HDRLEN ((int) NLMSG_ALIGN(sizeof(struct nlmsghdr))) |
| 81 | #define NLMSG_LENGTH(len) ((len)+NLMSG_ALIGN(NLMSG_HDRLEN)) | 82 | #define NLMSG_LENGTH(len) ((len) + NLMSG_HDRLEN) |
| 82 | #define NLMSG_SPACE(len) NLMSG_ALIGN(NLMSG_LENGTH(len)) | 83 | #define NLMSG_SPACE(len) NLMSG_ALIGN(NLMSG_LENGTH(len)) |
| 83 | #define NLMSG_DATA(nlh) ((void*)(((char*)nlh) + NLMSG_LENGTH(0))) | 84 | #define NLMSG_DATA(nlh) ((void*)(((char*)nlh) + NLMSG_LENGTH(0))) |
| 84 | #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \ | 85 | #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \ |
| @@ -105,11 +106,42 @@ struct nlmsgerr { | |||
| 105 | #define NETLINK_PKTINFO 3 | 106 | #define NETLINK_PKTINFO 3 |
| 106 | #define NETLINK_BROADCAST_ERROR 4 | 107 | #define NETLINK_BROADCAST_ERROR 4 |
| 107 | #define NETLINK_NO_ENOBUFS 5 | 108 | #define NETLINK_NO_ENOBUFS 5 |
| 109 | #define NETLINK_RX_RING 6 | ||
| 110 | #define NETLINK_TX_RING 7 | ||
| 108 | 111 | ||
| 109 | struct nl_pktinfo { | 112 | struct nl_pktinfo { |
| 110 | __u32 group; | 113 | __u32 group; |
| 111 | }; | 114 | }; |
| 112 | 115 | ||
| 116 | struct nl_mmap_req { | ||
| 117 | unsigned int nm_block_size; | ||
| 118 | unsigned int nm_block_nr; | ||
| 119 | unsigned int nm_frame_size; | ||
| 120 | unsigned int nm_frame_nr; | ||
| 121 | }; | ||
| 122 | |||
| 123 | struct nl_mmap_hdr { | ||
| 124 | unsigned int nm_status; | ||
| 125 | unsigned int nm_len; | ||
| 126 | __u32 nm_group; | ||
| 127 | /* credentials */ | ||
| 128 | __u32 nm_pid; | ||
| 129 | __u32 nm_uid; | ||
| 130 | __u32 nm_gid; | ||
| 131 | }; | ||
| 132 | |||
| 133 | enum nl_mmap_status { | ||
| 134 | NL_MMAP_STATUS_UNUSED, | ||
| 135 | NL_MMAP_STATUS_RESERVED, | ||
| 136 | NL_MMAP_STATUS_VALID, | ||
| 137 | NL_MMAP_STATUS_COPY, | ||
| 138 | NL_MMAP_STATUS_SKIP, | ||
| 139 | }; | ||
| 140 | |||
| 141 | #define NL_MMAP_MSG_ALIGNMENT NLMSG_ALIGNTO | ||
| 142 | #define NL_MMAP_MSG_ALIGN(sz) __ALIGN_KERNEL(sz, NL_MMAP_MSG_ALIGNMENT) | ||
| 143 | #define NL_MMAP_HDRLEN NL_MMAP_MSG_ALIGN(sizeof(struct nl_mmap_hdr)) | ||
| 144 | |||
| 113 | #define NET_MAJOR 36 /* Major 36 is reserved for networking */ | 145 | #define NET_MAJOR 36 /* Major 36 is reserved for networking */ |
| 114 | 146 | ||
| 115 | enum { | 147 | enum { |
diff --git a/include/uapi/linux/netlink_diag.h b/include/uapi/linux/netlink_diag.h new file mode 100644 index 000000000000..4e31db4eea41 --- /dev/null +++ b/include/uapi/linux/netlink_diag.h | |||
| @@ -0,0 +1,52 @@ | |||
| 1 | #ifndef __NETLINK_DIAG_H__ | ||
| 2 | #define __NETLINK_DIAG_H__ | ||
| 3 | |||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 6 | struct netlink_diag_req { | ||
| 7 | __u8 sdiag_family; | ||
| 8 | __u8 sdiag_protocol; | ||
| 9 | __u16 pad; | ||
| 10 | __u32 ndiag_ino; | ||
| 11 | __u32 ndiag_show; | ||
| 12 | __u32 ndiag_cookie[2]; | ||
| 13 | }; | ||
| 14 | |||
| 15 | struct netlink_diag_msg { | ||
| 16 | __u8 ndiag_family; | ||
| 17 | __u8 ndiag_type; | ||
| 18 | __u8 ndiag_protocol; | ||
| 19 | __u8 ndiag_state; | ||
| 20 | |||
| 21 | __u32 ndiag_portid; | ||
| 22 | __u32 ndiag_dst_portid; | ||
| 23 | __u32 ndiag_dst_group; | ||
| 24 | __u32 ndiag_ino; | ||
| 25 | __u32 ndiag_cookie[2]; | ||
| 26 | }; | ||
| 27 | |||
| 28 | struct netlink_diag_ring { | ||
| 29 | __u32 ndr_block_size; | ||
| 30 | __u32 ndr_block_nr; | ||
| 31 | __u32 ndr_frame_size; | ||
| 32 | __u32 ndr_frame_nr; | ||
| 33 | }; | ||
| 34 | |||
| 35 | enum { | ||
| 36 | NETLINK_DIAG_MEMINFO, | ||
| 37 | NETLINK_DIAG_GROUPS, | ||
| 38 | NETLINK_DIAG_RX_RING, | ||
| 39 | NETLINK_DIAG_TX_RING, | ||
| 40 | |||
| 41 | __NETLINK_DIAG_MAX, | ||
| 42 | }; | ||
| 43 | |||
| 44 | #define NETLINK_DIAG_MAX (__NETLINK_DIAG_MAX - 1) | ||
| 45 | |||
| 46 | #define NDIAG_PROTO_ALL ((__u8) ~0) | ||
| 47 | |||
| 48 | #define NDIAG_SHOW_MEMINFO 0x00000001 /* show memory info of a socket */ | ||
| 49 | #define NDIAG_SHOW_GROUPS 0x00000002 /* show groups of a netlink socket */ | ||
| 50 | #define NDIAG_SHOW_RING_CFG 0x00000004 /* show ring configuration */ | ||
| 51 | |||
| 52 | #endif | ||
diff --git a/include/uapi/linux/openvswitch.h b/include/uapi/linux/openvswitch.h new file mode 100644 index 000000000000..405918dd7b3f --- /dev/null +++ b/include/uapi/linux/openvswitch.h | |||
| @@ -0,0 +1,456 @@ | |||
| 1 | |||
| 2 | /* | ||
| 3 | * Copyright (c) 2007-2011 Nicira Networks. | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or | ||
| 6 | * modify it under the terms of version 2 of the GNU General Public | ||
| 7 | * License as published by the Free Software Foundation. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, but | ||
| 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 12 | * General Public License for more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License | ||
| 15 | * along with this program; if not, write to the Free Software | ||
| 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | ||
| 17 | * 02110-1301, USA | ||
| 18 | */ | ||
| 19 | |||
| 20 | #ifndef _UAPI__LINUX_OPENVSWITCH_H | ||
| 21 | #define _UAPI__LINUX_OPENVSWITCH_H 1 | ||
| 22 | |||
| 23 | #include <linux/types.h> | ||
| 24 | #include <linux/if_ether.h> | ||
| 25 | |||
| 26 | /** | ||
| 27 | * struct ovs_header - header for OVS Generic Netlink messages. | ||
| 28 | * @dp_ifindex: ifindex of local port for datapath (0 to make a request not | ||
| 29 | * specific to a datapath). | ||
| 30 | * | ||
| 31 | * Attributes following the header are specific to a particular OVS Generic | ||
| 32 | * Netlink family, but all of the OVS families use this header. | ||
| 33 | */ | ||
| 34 | |||
| 35 | struct ovs_header { | ||
| 36 | int dp_ifindex; | ||
| 37 | }; | ||
| 38 | |||
| 39 | /* Datapaths. */ | ||
| 40 | |||
| 41 | #define OVS_DATAPATH_FAMILY "ovs_datapath" | ||
| 42 | #define OVS_DATAPATH_MCGROUP "ovs_datapath" | ||
| 43 | #define OVS_DATAPATH_VERSION 0x1 | ||
| 44 | |||
| 45 | enum ovs_datapath_cmd { | ||
| 46 | OVS_DP_CMD_UNSPEC, | ||
| 47 | OVS_DP_CMD_NEW, | ||
| 48 | OVS_DP_CMD_DEL, | ||
| 49 | OVS_DP_CMD_GET, | ||
| 50 | OVS_DP_CMD_SET | ||
| 51 | }; | ||
| 52 | |||
| 53 | /** | ||
| 54 | * enum ovs_datapath_attr - attributes for %OVS_DP_* commands. | ||
| 55 | * @OVS_DP_ATTR_NAME: Name of the network device that serves as the "local | ||
| 56 | * port". This is the name of the network device whose dp_ifindex is given in | ||
| 57 | * the &struct ovs_header. Always present in notifications. Required in | ||
| 58 | * %OVS_DP_NEW requests. May be used as an alternative to specifying | ||
| 59 | * dp_ifindex in other requests (with a dp_ifindex of 0). | ||
| 60 | * @OVS_DP_ATTR_UPCALL_PID: The Netlink socket in userspace that is initially | ||
| 61 | * set on the datapath port (for OVS_ACTION_ATTR_MISS). Only valid on | ||
| 62 | * %OVS_DP_CMD_NEW requests. A value of zero indicates that upcalls should | ||
| 63 | * not be sent. | ||
| 64 | * @OVS_DP_ATTR_STATS: Statistics about packets that have passed through the | ||
| 65 | * datapath. Always present in notifications. | ||
| 66 | * | ||
| 67 | * These attributes follow the &struct ovs_header within the Generic Netlink | ||
| 68 | * payload for %OVS_DP_* commands. | ||
| 69 | */ | ||
| 70 | enum ovs_datapath_attr { | ||
| 71 | OVS_DP_ATTR_UNSPEC, | ||
| 72 | OVS_DP_ATTR_NAME, /* name of dp_ifindex netdev */ | ||
| 73 | OVS_DP_ATTR_UPCALL_PID, /* Netlink PID to receive upcalls */ | ||
| 74 | OVS_DP_ATTR_STATS, /* struct ovs_dp_stats */ | ||
| 75 | __OVS_DP_ATTR_MAX | ||
| 76 | }; | ||
| 77 | |||
| 78 | #define OVS_DP_ATTR_MAX (__OVS_DP_ATTR_MAX - 1) | ||
| 79 | |||
| 80 | struct ovs_dp_stats { | ||
| 81 | __u64 n_hit; /* Number of flow table matches. */ | ||
| 82 | __u64 n_missed; /* Number of flow table misses. */ | ||
| 83 | __u64 n_lost; /* Number of misses not sent to userspace. */ | ||
| 84 | __u64 n_flows; /* Number of flows present */ | ||
| 85 | }; | ||
| 86 | |||
| 87 | struct ovs_vport_stats { | ||
| 88 | __u64 rx_packets; /* total packets received */ | ||
| 89 | __u64 tx_packets; /* total packets transmitted */ | ||
| 90 | __u64 rx_bytes; /* total bytes received */ | ||
| 91 | __u64 tx_bytes; /* total bytes transmitted */ | ||
| 92 | __u64 rx_errors; /* bad packets received */ | ||
| 93 | __u64 tx_errors; /* packet transmit problems */ | ||
| 94 | __u64 rx_dropped; /* no space in linux buffers */ | ||
| 95 | __u64 tx_dropped; /* no space available in linux */ | ||
| 96 | }; | ||
| 97 | |||
| 98 | /* Fixed logical ports. */ | ||
| 99 | #define OVSP_LOCAL ((__u32)0) | ||
| 100 | |||
| 101 | /* Packet transfer. */ | ||
| 102 | |||
| 103 | #define OVS_PACKET_FAMILY "ovs_packet" | ||
| 104 | #define OVS_PACKET_VERSION 0x1 | ||
| 105 | |||
| 106 | enum ovs_packet_cmd { | ||
| 107 | OVS_PACKET_CMD_UNSPEC, | ||
| 108 | |||
| 109 | /* Kernel-to-user notifications. */ | ||
| 110 | OVS_PACKET_CMD_MISS, /* Flow table miss. */ | ||
| 111 | OVS_PACKET_CMD_ACTION, /* OVS_ACTION_ATTR_USERSPACE action. */ | ||
| 112 | |||
| 113 | /* Userspace commands. */ | ||
| 114 | OVS_PACKET_CMD_EXECUTE /* Apply actions to a packet. */ | ||
| 115 | }; | ||
| 116 | |||
| 117 | /** | ||
| 118 | * enum ovs_packet_attr - attributes for %OVS_PACKET_* commands. | ||
| 119 | * @OVS_PACKET_ATTR_PACKET: Present for all notifications. Contains the entire | ||
| 120 | * packet as received, from the start of the Ethernet header onward. For | ||
| 121 | * %OVS_PACKET_CMD_ACTION, %OVS_PACKET_ATTR_PACKET reflects changes made by | ||
| 122 | * actions preceding %OVS_ACTION_ATTR_USERSPACE, but %OVS_PACKET_ATTR_KEY is | ||
| 123 | * the flow key extracted from the packet as originally received. | ||
| 124 | * @OVS_PACKET_ATTR_KEY: Present for all notifications. Contains the flow key | ||
| 125 | * extracted from the packet as nested %OVS_KEY_ATTR_* attributes. This allows | ||
| 126 | * userspace to adapt its flow setup strategy by comparing its notion of the | ||
| 127 | * flow key against the kernel's. | ||
| 128 | * @OVS_PACKET_ATTR_ACTIONS: Contains actions for the packet. Used | ||
| 129 | * for %OVS_PACKET_CMD_EXECUTE. It has nested %OVS_ACTION_ATTR_* attributes. | ||
| 130 | * @OVS_PACKET_ATTR_USERDATA: Present for an %OVS_PACKET_CMD_ACTION | ||
| 131 | * notification if the %OVS_ACTION_ATTR_USERSPACE action specified an | ||
| 132 | * %OVS_USERSPACE_ATTR_USERDATA attribute, with the same length and content | ||
| 133 | * specified there. | ||
| 134 | * | ||
| 135 | * These attributes follow the &struct ovs_header within the Generic Netlink | ||
| 136 | * payload for %OVS_PACKET_* commands. | ||
| 137 | */ | ||
| 138 | enum ovs_packet_attr { | ||
| 139 | OVS_PACKET_ATTR_UNSPEC, | ||
| 140 | OVS_PACKET_ATTR_PACKET, /* Packet data. */ | ||
| 141 | OVS_PACKET_ATTR_KEY, /* Nested OVS_KEY_ATTR_* attributes. */ | ||
| 142 | OVS_PACKET_ATTR_ACTIONS, /* Nested OVS_ACTION_ATTR_* attributes. */ | ||
| 143 | OVS_PACKET_ATTR_USERDATA, /* OVS_ACTION_ATTR_USERSPACE arg. */ | ||
| 144 | __OVS_PACKET_ATTR_MAX | ||
| 145 | }; | ||
| 146 | |||
| 147 | #define OVS_PACKET_ATTR_MAX (__OVS_PACKET_ATTR_MAX - 1) | ||
| 148 | |||
| 149 | /* Virtual ports. */ | ||
| 150 | |||
| 151 | #define OVS_VPORT_FAMILY "ovs_vport" | ||
| 152 | #define OVS_VPORT_MCGROUP "ovs_vport" | ||
| 153 | #define OVS_VPORT_VERSION 0x1 | ||
| 154 | |||
| 155 | enum ovs_vport_cmd { | ||
| 156 | OVS_VPORT_CMD_UNSPEC, | ||
| 157 | OVS_VPORT_CMD_NEW, | ||
| 158 | OVS_VPORT_CMD_DEL, | ||
| 159 | OVS_VPORT_CMD_GET, | ||
| 160 | OVS_VPORT_CMD_SET | ||
| 161 | }; | ||
| 162 | |||
| 163 | enum ovs_vport_type { | ||
| 164 | OVS_VPORT_TYPE_UNSPEC, | ||
| 165 | OVS_VPORT_TYPE_NETDEV, /* network device */ | ||
| 166 | OVS_VPORT_TYPE_INTERNAL, /* network device implemented by datapath */ | ||
| 167 | __OVS_VPORT_TYPE_MAX | ||
| 168 | }; | ||
| 169 | |||
| 170 | #define OVS_VPORT_TYPE_MAX (__OVS_VPORT_TYPE_MAX - 1) | ||
| 171 | |||
| 172 | /** | ||
| 173 | * enum ovs_vport_attr - attributes for %OVS_VPORT_* commands. | ||
| 174 | * @OVS_VPORT_ATTR_PORT_NO: 32-bit port number within datapath. | ||
| 175 | * @OVS_VPORT_ATTR_TYPE: 32-bit %OVS_VPORT_TYPE_* constant describing the type | ||
| 176 | * of vport. | ||
| 177 | * @OVS_VPORT_ATTR_NAME: Name of vport. For a vport based on a network device | ||
| 178 | * this is the name of the network device. Maximum length %IFNAMSIZ-1 bytes | ||
| 179 | * plus a null terminator. | ||
| 180 | * @OVS_VPORT_ATTR_OPTIONS: Vport-specific configuration information. | ||
| 181 | * @OVS_VPORT_ATTR_UPCALL_PID: The Netlink socket in userspace that | ||
| 182 | * OVS_PACKET_CMD_MISS upcalls will be directed to for packets received on | ||
| 183 | * this port. A value of zero indicates that upcalls should not be sent. | ||
| 184 | * @OVS_VPORT_ATTR_STATS: A &struct ovs_vport_stats giving statistics for | ||
| 185 | * packets sent or received through the vport. | ||
| 186 | * | ||
| 187 | * These attributes follow the &struct ovs_header within the Generic Netlink | ||
| 188 | * payload for %OVS_VPORT_* commands. | ||
| 189 | * | ||
| 190 | * For %OVS_VPORT_CMD_NEW requests, the %OVS_VPORT_ATTR_TYPE and | ||
| 191 | * %OVS_VPORT_ATTR_NAME attributes are required. %OVS_VPORT_ATTR_PORT_NO is | ||
| 192 | * optional; if not specified a free port number is automatically selected. | ||
| 193 | * Whether %OVS_VPORT_ATTR_OPTIONS is required or optional depends on the type | ||
| 194 | * of vport. | ||
| 195 | * and other attributes are ignored. | ||
| 196 | * | ||
| 197 | * For other requests, if %OVS_VPORT_ATTR_NAME is specified then it is used to | ||
| 198 | * look up the vport to operate on; otherwise dp_idx from the &struct | ||
| 199 | * ovs_header plus %OVS_VPORT_ATTR_PORT_NO determine the vport. | ||
| 200 | */ | ||
| 201 | enum ovs_vport_attr { | ||
| 202 | OVS_VPORT_ATTR_UNSPEC, | ||
| 203 | OVS_VPORT_ATTR_PORT_NO, /* u32 port number within datapath */ | ||
| 204 | OVS_VPORT_ATTR_TYPE, /* u32 OVS_VPORT_TYPE_* constant. */ | ||
| 205 | OVS_VPORT_ATTR_NAME, /* string name, up to IFNAMSIZ bytes long */ | ||
| 206 | OVS_VPORT_ATTR_OPTIONS, /* nested attributes, varies by vport type */ | ||
| 207 | OVS_VPORT_ATTR_UPCALL_PID, /* u32 Netlink PID to receive upcalls */ | ||
| 208 | OVS_VPORT_ATTR_STATS, /* struct ovs_vport_stats */ | ||
| 209 | __OVS_VPORT_ATTR_MAX | ||
| 210 | }; | ||
| 211 | |||
| 212 | #define OVS_VPORT_ATTR_MAX (__OVS_VPORT_ATTR_MAX - 1) | ||
| 213 | |||
| 214 | /* Flows. */ | ||
| 215 | |||
| 216 | #define OVS_FLOW_FAMILY "ovs_flow" | ||
| 217 | #define OVS_FLOW_MCGROUP "ovs_flow" | ||
| 218 | #define OVS_FLOW_VERSION 0x1 | ||
| 219 | |||
| 220 | enum ovs_flow_cmd { | ||
| 221 | OVS_FLOW_CMD_UNSPEC, | ||
| 222 | OVS_FLOW_CMD_NEW, | ||
| 223 | OVS_FLOW_CMD_DEL, | ||
| 224 | OVS_FLOW_CMD_GET, | ||
| 225 | OVS_FLOW_CMD_SET | ||
| 226 | }; | ||
| 227 | |||
| 228 | struct ovs_flow_stats { | ||
| 229 | __u64 n_packets; /* Number of matched packets. */ | ||
| 230 | __u64 n_bytes; /* Number of matched bytes. */ | ||
| 231 | }; | ||
| 232 | |||
| 233 | enum ovs_key_attr { | ||
| 234 | OVS_KEY_ATTR_UNSPEC, | ||
| 235 | OVS_KEY_ATTR_ENCAP, /* Nested set of encapsulated attributes. */ | ||
| 236 | OVS_KEY_ATTR_PRIORITY, /* u32 skb->priority */ | ||
| 237 | OVS_KEY_ATTR_IN_PORT, /* u32 OVS dp port number */ | ||
| 238 | OVS_KEY_ATTR_ETHERNET, /* struct ovs_key_ethernet */ | ||
| 239 | OVS_KEY_ATTR_VLAN, /* be16 VLAN TCI */ | ||
| 240 | OVS_KEY_ATTR_ETHERTYPE, /* be16 Ethernet type */ | ||
| 241 | OVS_KEY_ATTR_IPV4, /* struct ovs_key_ipv4 */ | ||
| 242 | OVS_KEY_ATTR_IPV6, /* struct ovs_key_ipv6 */ | ||
| 243 | OVS_KEY_ATTR_TCP, /* struct ovs_key_tcp */ | ||
| 244 | OVS_KEY_ATTR_UDP, /* struct ovs_key_udp */ | ||
| 245 | OVS_KEY_ATTR_ICMP, /* struct ovs_key_icmp */ | ||
| 246 | OVS_KEY_ATTR_ICMPV6, /* struct ovs_key_icmpv6 */ | ||
| 247 | OVS_KEY_ATTR_ARP, /* struct ovs_key_arp */ | ||
| 248 | OVS_KEY_ATTR_ND, /* struct ovs_key_nd */ | ||
| 249 | OVS_KEY_ATTR_SKB_MARK, /* u32 skb mark */ | ||
| 250 | __OVS_KEY_ATTR_MAX | ||
| 251 | }; | ||
| 252 | |||
| 253 | #define OVS_KEY_ATTR_MAX (__OVS_KEY_ATTR_MAX - 1) | ||
| 254 | |||
| 255 | /** | ||
| 256 | * enum ovs_frag_type - IPv4 and IPv6 fragment type | ||
| 257 | * @OVS_FRAG_TYPE_NONE: Packet is not a fragment. | ||
| 258 | * @OVS_FRAG_TYPE_FIRST: Packet is a fragment with offset 0. | ||
| 259 | * @OVS_FRAG_TYPE_LATER: Packet is a fragment with nonzero offset. | ||
| 260 | * | ||
| 261 | * Used as the @ipv4_frag in &struct ovs_key_ipv4 and as @ipv6_frag &struct | ||
| 262 | * ovs_key_ipv6. | ||
| 263 | */ | ||
| 264 | enum ovs_frag_type { | ||
| 265 | OVS_FRAG_TYPE_NONE, | ||
| 266 | OVS_FRAG_TYPE_FIRST, | ||
| 267 | OVS_FRAG_TYPE_LATER, | ||
| 268 | __OVS_FRAG_TYPE_MAX | ||
| 269 | }; | ||
| 270 | |||
| 271 | #define OVS_FRAG_TYPE_MAX (__OVS_FRAG_TYPE_MAX - 1) | ||
| 272 | |||
| 273 | struct ovs_key_ethernet { | ||
| 274 | __u8 eth_src[ETH_ALEN]; | ||
| 275 | __u8 eth_dst[ETH_ALEN]; | ||
| 276 | }; | ||
| 277 | |||
| 278 | struct ovs_key_ipv4 { | ||
| 279 | __be32 ipv4_src; | ||
| 280 | __be32 ipv4_dst; | ||
| 281 | __u8 ipv4_proto; | ||
| 282 | __u8 ipv4_tos; | ||
| 283 | __u8 ipv4_ttl; | ||
| 284 | __u8 ipv4_frag; /* One of OVS_FRAG_TYPE_*. */ | ||
| 285 | }; | ||
| 286 | |||
| 287 | struct ovs_key_ipv6 { | ||
| 288 | __be32 ipv6_src[4]; | ||
| 289 | __be32 ipv6_dst[4]; | ||
| 290 | __be32 ipv6_label; /* 20-bits in least-significant bits. */ | ||
| 291 | __u8 ipv6_proto; | ||
| 292 | __u8 ipv6_tclass; | ||
| 293 | __u8 ipv6_hlimit; | ||
| 294 | __u8 ipv6_frag; /* One of OVS_FRAG_TYPE_*. */ | ||
| 295 | }; | ||
| 296 | |||
| 297 | struct ovs_key_tcp { | ||
| 298 | __be16 tcp_src; | ||
| 299 | __be16 tcp_dst; | ||
| 300 | }; | ||
| 301 | |||
| 302 | struct ovs_key_udp { | ||
| 303 | __be16 udp_src; | ||
| 304 | __be16 udp_dst; | ||
| 305 | }; | ||
| 306 | |||
| 307 | struct ovs_key_icmp { | ||
| 308 | __u8 icmp_type; | ||
| 309 | __u8 icmp_code; | ||
| 310 | }; | ||
| 311 | |||
| 312 | struct ovs_key_icmpv6 { | ||
| 313 | __u8 icmpv6_type; | ||
| 314 | __u8 icmpv6_code; | ||
| 315 | }; | ||
| 316 | |||
| 317 | struct ovs_key_arp { | ||
| 318 | __be32 arp_sip; | ||
| 319 | __be32 arp_tip; | ||
| 320 | __be16 arp_op; | ||
| 321 | __u8 arp_sha[ETH_ALEN]; | ||
| 322 | __u8 arp_tha[ETH_ALEN]; | ||
| 323 | }; | ||
| 324 | |||
| 325 | struct ovs_key_nd { | ||
| 326 | __u32 nd_target[4]; | ||
| 327 | __u8 nd_sll[ETH_ALEN]; | ||
| 328 | __u8 nd_tll[ETH_ALEN]; | ||
| 329 | }; | ||
| 330 | |||
| 331 | /** | ||
| 332 | * enum ovs_flow_attr - attributes for %OVS_FLOW_* commands. | ||
| 333 | * @OVS_FLOW_ATTR_KEY: Nested %OVS_KEY_ATTR_* attributes specifying the flow | ||
| 334 | * key. Always present in notifications. Required for all requests (except | ||
| 335 | * dumps). | ||
| 336 | * @OVS_FLOW_ATTR_ACTIONS: Nested %OVS_ACTION_ATTR_* attributes specifying | ||
| 337 | * the actions to take for packets that match the key. Always present in | ||
| 338 | * notifications. Required for %OVS_FLOW_CMD_NEW requests, optional for | ||
| 339 | * %OVS_FLOW_CMD_SET requests. | ||
| 340 | * @OVS_FLOW_ATTR_STATS: &struct ovs_flow_stats giving statistics for this | ||
| 341 | * flow. Present in notifications if the stats would be nonzero. Ignored in | ||
| 342 | * requests. | ||
| 343 | * @OVS_FLOW_ATTR_TCP_FLAGS: An 8-bit value giving the OR'd value of all of the | ||
| 344 | * TCP flags seen on packets in this flow. Only present in notifications for | ||
| 345 | * TCP flows, and only if it would be nonzero. Ignored in requests. | ||
| 346 | * @OVS_FLOW_ATTR_USED: A 64-bit integer giving the time, in milliseconds on | ||
| 347 | * the system monotonic clock, at which a packet was last processed for this | ||
| 348 | * flow. Only present in notifications if a packet has been processed for this | ||
| 349 | * flow. Ignored in requests. | ||
| 350 | * @OVS_FLOW_ATTR_CLEAR: If present in a %OVS_FLOW_CMD_SET request, clears the | ||
| 351 | * last-used time, accumulated TCP flags, and statistics for this flow. | ||
| 352 | * Otherwise ignored in requests. Never present in notifications. | ||
| 353 | * | ||
| 354 | * These attributes follow the &struct ovs_header within the Generic Netlink | ||
| 355 | * payload for %OVS_FLOW_* commands. | ||
| 356 | */ | ||
| 357 | enum ovs_flow_attr { | ||
| 358 | OVS_FLOW_ATTR_UNSPEC, | ||
| 359 | OVS_FLOW_ATTR_KEY, /* Sequence of OVS_KEY_ATTR_* attributes. */ | ||
| 360 | OVS_FLOW_ATTR_ACTIONS, /* Nested OVS_ACTION_ATTR_* attributes. */ | ||
| 361 | OVS_FLOW_ATTR_STATS, /* struct ovs_flow_stats. */ | ||
| 362 | OVS_FLOW_ATTR_TCP_FLAGS, /* 8-bit OR'd TCP flags. */ | ||
| 363 | OVS_FLOW_ATTR_USED, /* u64 msecs last used in monotonic time. */ | ||
| 364 | OVS_FLOW_ATTR_CLEAR, /* Flag to clear stats, tcp_flags, used. */ | ||
| 365 | __OVS_FLOW_ATTR_MAX | ||
| 366 | }; | ||
| 367 | |||
| 368 | #define OVS_FLOW_ATTR_MAX (__OVS_FLOW_ATTR_MAX - 1) | ||
| 369 | |||
| 370 | /** | ||
| 371 | * enum ovs_sample_attr - Attributes for %OVS_ACTION_ATTR_SAMPLE action. | ||
| 372 | * @OVS_SAMPLE_ATTR_PROBABILITY: 32-bit fraction of packets to sample with | ||
| 373 | * @OVS_ACTION_ATTR_SAMPLE. A value of 0 samples no packets, a value of | ||
| 374 | * %UINT32_MAX samples all packets and intermediate values sample intermediate | ||
| 375 | * fractions of packets. | ||
| 376 | * @OVS_SAMPLE_ATTR_ACTIONS: Set of actions to execute in sampling event. | ||
| 377 | * Actions are passed as nested attributes. | ||
| 378 | * | ||
| 379 | * Executes the specified actions with the given probability on a per-packet | ||
| 380 | * basis. | ||
| 381 | */ | ||
| 382 | enum ovs_sample_attr { | ||
| 383 | OVS_SAMPLE_ATTR_UNSPEC, | ||
| 384 | OVS_SAMPLE_ATTR_PROBABILITY, /* u32 number */ | ||
| 385 | OVS_SAMPLE_ATTR_ACTIONS, /* Nested OVS_ACTION_ATTR_* attributes. */ | ||
| 386 | __OVS_SAMPLE_ATTR_MAX, | ||
| 387 | }; | ||
| 388 | |||
| 389 | #define OVS_SAMPLE_ATTR_MAX (__OVS_SAMPLE_ATTR_MAX - 1) | ||
| 390 | |||
| 391 | /** | ||
| 392 | * enum ovs_userspace_attr - Attributes for %OVS_ACTION_ATTR_USERSPACE action. | ||
| 393 | * @OVS_USERSPACE_ATTR_PID: u32 Netlink PID to which the %OVS_PACKET_CMD_ACTION | ||
| 394 | * message should be sent. Required. | ||
| 395 | * @OVS_USERSPACE_ATTR_USERDATA: If present, its variable-length argument is | ||
| 396 | * copied to the %OVS_PACKET_CMD_ACTION message as %OVS_PACKET_ATTR_USERDATA. | ||
| 397 | */ | ||
| 398 | enum ovs_userspace_attr { | ||
| 399 | OVS_USERSPACE_ATTR_UNSPEC, | ||
| 400 | OVS_USERSPACE_ATTR_PID, /* u32 Netlink PID to receive upcalls. */ | ||
| 401 | OVS_USERSPACE_ATTR_USERDATA, /* Optional user-specified cookie. */ | ||
| 402 | __OVS_USERSPACE_ATTR_MAX | ||
| 403 | }; | ||
| 404 | |||
| 405 | #define OVS_USERSPACE_ATTR_MAX (__OVS_USERSPACE_ATTR_MAX - 1) | ||
| 406 | |||
| 407 | /** | ||
| 408 | * struct ovs_action_push_vlan - %OVS_ACTION_ATTR_PUSH_VLAN action argument. | ||
| 409 | * @vlan_tpid: Tag protocol identifier (TPID) to push. | ||
| 410 | * @vlan_tci: Tag control identifier (TCI) to push. The CFI bit must be set | ||
| 411 | * (but it will not be set in the 802.1Q header that is pushed). | ||
| 412 | * | ||
| 413 | * The @vlan_tpid value is typically %ETH_P_8021Q. The only acceptable TPID | ||
| 414 | * values are those that the kernel module also parses as 802.1Q headers, to | ||
| 415 | * prevent %OVS_ACTION_ATTR_PUSH_VLAN followed by %OVS_ACTION_ATTR_POP_VLAN | ||
| 416 | * from having surprising results. | ||
| 417 | */ | ||
| 418 | struct ovs_action_push_vlan { | ||
| 419 | __be16 vlan_tpid; /* 802.1Q TPID. */ | ||
| 420 | __be16 vlan_tci; /* 802.1Q TCI (VLAN ID and priority). */ | ||
| 421 | }; | ||
| 422 | |||
| 423 | /** | ||
| 424 | * enum ovs_action_attr - Action types. | ||
| 425 | * | ||
| 426 | * @OVS_ACTION_ATTR_OUTPUT: Output packet to port. | ||
| 427 | * @OVS_ACTION_ATTR_USERSPACE: Send packet to userspace according to nested | ||
| 428 | * %OVS_USERSPACE_ATTR_* attributes. | ||
| 429 | * @OVS_ACTION_ATTR_SET: Replaces the contents of an existing header. The | ||
| 430 | * single nested %OVS_KEY_ATTR_* attribute specifies a header to modify and its | ||
| 431 | * value. | ||
| 432 | * @OVS_ACTION_ATTR_PUSH_VLAN: Push a new outermost 802.1Q header onto the | ||
| 433 | * packet. | ||
| 434 | * @OVS_ACTION_ATTR_POP_VLAN: Pop the outermost 802.1Q header off the packet. | ||
| 435 | * @OVS_ACTION_ATTR_SAMPLE: Probabilitically executes actions, as specified in | ||
| 436 | * the nested %OVS_SAMPLE_ATTR_* attributes. | ||
| 437 | * | ||
| 438 | * Only a single header can be set with a single %OVS_ACTION_ATTR_SET. Not all | ||
| 439 | * fields within a header are modifiable, e.g. the IPv4 protocol and fragment | ||
| 440 | * type may not be changed. | ||
| 441 | */ | ||
| 442 | |||
| 443 | enum ovs_action_attr { | ||
| 444 | OVS_ACTION_ATTR_UNSPEC, | ||
| 445 | OVS_ACTION_ATTR_OUTPUT, /* u32 port number. */ | ||
| 446 | OVS_ACTION_ATTR_USERSPACE, /* Nested OVS_USERSPACE_ATTR_*. */ | ||
| 447 | OVS_ACTION_ATTR_SET, /* One nested OVS_KEY_ATTR_*. */ | ||
| 448 | OVS_ACTION_ATTR_PUSH_VLAN, /* struct ovs_action_push_vlan. */ | ||
| 449 | OVS_ACTION_ATTR_POP_VLAN, /* No argument. */ | ||
| 450 | OVS_ACTION_ATTR_SAMPLE, /* Nested OVS_SAMPLE_ATTR_*. */ | ||
| 451 | __OVS_ACTION_ATTR_MAX | ||
| 452 | }; | ||
| 453 | |||
| 454 | #define OVS_ACTION_ATTR_MAX (__OVS_ACTION_ATTR_MAX - 1) | ||
| 455 | |||
| 456 | #endif /* _LINUX_OPENVSWITCH_H */ | ||
diff --git a/include/uapi/linux/packet_diag.h b/include/uapi/linux/packet_diag.h index 93f5fa94a431..afafd703ad92 100644 --- a/include/uapi/linux/packet_diag.h +++ b/include/uapi/linux/packet_diag.h | |||
| @@ -33,9 +33,11 @@ enum { | |||
| 33 | PACKET_DIAG_TX_RING, | 33 | PACKET_DIAG_TX_RING, |
| 34 | PACKET_DIAG_FANOUT, | 34 | PACKET_DIAG_FANOUT, |
| 35 | 35 | ||
| 36 | PACKET_DIAG_MAX, | 36 | __PACKET_DIAG_MAX, |
| 37 | }; | 37 | }; |
| 38 | 38 | ||
| 39 | #define PACKET_DIAG_MAX (__PACKET_DIAG_MAX - 1) | ||
| 40 | |||
| 39 | struct packet_diag_info { | 41 | struct packet_diag_info { |
| 40 | __u32 pdi_index; | 42 | __u32 pdi_index; |
| 41 | __u32 pdi_version; | 43 | __u32 pdi_version; |
diff --git a/include/uapi/linux/pkt_sched.h b/include/uapi/linux/pkt_sched.h index 32aef0a439ef..dbd71b0c7d8c 100644 --- a/include/uapi/linux/pkt_sched.h +++ b/include/uapi/linux/pkt_sched.h | |||
| @@ -348,6 +348,7 @@ enum { | |||
| 348 | TCA_HTB_INIT, | 348 | TCA_HTB_INIT, |
| 349 | TCA_HTB_CTAB, | 349 | TCA_HTB_CTAB, |
| 350 | TCA_HTB_RTAB, | 350 | TCA_HTB_RTAB, |
| 351 | TCA_HTB_DIRECT_QLEN, | ||
| 351 | __TCA_HTB_MAX, | 352 | __TCA_HTB_MAX, |
| 352 | }; | 353 | }; |
| 353 | 354 | ||
diff --git a/include/uapi/linux/raid/md_p.h b/include/uapi/linux/raid/md_p.h index ee753536ab70..fe1a5406d4d9 100644 --- a/include/uapi/linux/raid/md_p.h +++ b/include/uapi/linux/raid/md_p.h | |||
| @@ -145,16 +145,18 @@ typedef struct mdp_superblock_s { | |||
| 145 | __u32 failed_disks; /* 4 Number of failed disks */ | 145 | __u32 failed_disks; /* 4 Number of failed disks */ |
| 146 | __u32 spare_disks; /* 5 Number of spare disks */ | 146 | __u32 spare_disks; /* 5 Number of spare disks */ |
| 147 | __u32 sb_csum; /* 6 checksum of the whole superblock */ | 147 | __u32 sb_csum; /* 6 checksum of the whole superblock */ |
| 148 | #ifdef __BIG_ENDIAN | 148 | #if defined(__BYTE_ORDER) ? __BYTE_ORDER == __BIG_ENDIAN : defined(__BIG_ENDIAN) |
| 149 | __u32 events_hi; /* 7 high-order of superblock update count */ | 149 | __u32 events_hi; /* 7 high-order of superblock update count */ |
| 150 | __u32 events_lo; /* 8 low-order of superblock update count */ | 150 | __u32 events_lo; /* 8 low-order of superblock update count */ |
| 151 | __u32 cp_events_hi; /* 9 high-order of checkpoint update count */ | 151 | __u32 cp_events_hi; /* 9 high-order of checkpoint update count */ |
| 152 | __u32 cp_events_lo; /* 10 low-order of checkpoint update count */ | 152 | __u32 cp_events_lo; /* 10 low-order of checkpoint update count */ |
| 153 | #else | 153 | #elif defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : defined(__LITTLE_ENDIAN) |
| 154 | __u32 events_lo; /* 7 low-order of superblock update count */ | 154 | __u32 events_lo; /* 7 low-order of superblock update count */ |
| 155 | __u32 events_hi; /* 8 high-order of superblock update count */ | 155 | __u32 events_hi; /* 8 high-order of superblock update count */ |
| 156 | __u32 cp_events_lo; /* 9 low-order of checkpoint update count */ | 156 | __u32 cp_events_lo; /* 9 low-order of checkpoint update count */ |
| 157 | __u32 cp_events_hi; /* 10 high-order of checkpoint update count */ | 157 | __u32 cp_events_hi; /* 10 high-order of checkpoint update count */ |
| 158 | #else | ||
| 159 | #error unspecified endianness | ||
| 158 | #endif | 160 | #endif |
| 159 | __u32 recovery_cp; /* 11 recovery checkpoint sector count */ | 161 | __u32 recovery_cp; /* 11 recovery checkpoint sector count */ |
| 160 | /* There are only valid for minor_version > 90 */ | 162 | /* There are only valid for minor_version > 90 */ |
diff --git a/include/uapi/linux/sctp.h b/include/uapi/linux/sctp.h new file mode 100644 index 000000000000..66b466e4ca08 --- /dev/null +++ b/include/uapi/linux/sctp.h | |||
| @@ -0,0 +1,846 @@ | |||
| 1 | /* SCTP kernel implementation | ||
| 2 | * (C) Copyright IBM Corp. 2001, 2004 | ||
| 3 | * Copyright (c) 1999-2000 Cisco, Inc. | ||
| 4 | * Copyright (c) 1999-2001 Motorola, Inc. | ||
| 5 | * Copyright (c) 2002 Intel Corp. | ||
| 6 | * | ||
| 7 | * This file is part of the SCTP kernel implementation | ||
| 8 | * | ||
| 9 | * This header represents the structures and constants needed to support | ||
| 10 | * the SCTP Extension to the Sockets API. | ||
| 11 | * | ||
| 12 | * This SCTP implementation is free software; | ||
| 13 | * you can redistribute it and/or modify it under the terms of | ||
| 14 | * the GNU General Public License as published by | ||
| 15 | * the Free Software Foundation; either version 2, or (at your option) | ||
| 16 | * any later version. | ||
| 17 | * | ||
| 18 | * This SCTP implementation is distributed in the hope that it | ||
| 19 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied | ||
| 20 | * ************************ | ||
| 21 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
| 22 | * See the GNU General Public License for more details. | ||
| 23 | * | ||
| 24 | * You should have received a copy of the GNU General Public License | ||
| 25 | * along with GNU CC; see the file COPYING. If not, write to | ||
| 26 | * the Free Software Foundation, 59 Temple Place - Suite 330, | ||
| 27 | * Boston, MA 02111-1307, USA. | ||
| 28 | * | ||
| 29 | * Please send any bug reports or fixes you make to the | ||
| 30 | * email address(es): | ||
| 31 | * lksctp developers <lksctp-developers@lists.sourceforge.net> | ||
| 32 | * | ||
| 33 | * Or submit a bug report through the following website: | ||
| 34 | * http://www.sf.net/projects/lksctp | ||
| 35 | * | ||
| 36 | * Written or modified by: | ||
| 37 | * La Monte H.P. Yarroll <piggy@acm.org> | ||
| 38 | * R. Stewart <randall@sctp.chicago.il.us> | ||
| 39 | * K. Morneau <kmorneau@cisco.com> | ||
| 40 | * Q. Xie <qxie1@email.mot.com> | ||
| 41 | * Karl Knutson <karl@athena.chicago.il.us> | ||
| 42 | * Jon Grimm <jgrimm@us.ibm.com> | ||
| 43 | * Daisy Chang <daisyc@us.ibm.com> | ||
| 44 | * Ryan Layer <rmlayer@us.ibm.com> | ||
| 45 | * Ardelle Fan <ardelle.fan@intel.com> | ||
| 46 | * Sridhar Samudrala <sri@us.ibm.com> | ||
| 47 | * Inaky Perez-Gonzalez <inaky.gonzalez@intel.com> | ||
| 48 | * Vlad Yasevich <vladislav.yasevich@hp.com> | ||
| 49 | * | ||
| 50 | * Any bugs reported given to us we will try to fix... any fixes shared will | ||
| 51 | * be incorporated into the next SCTP release. | ||
| 52 | */ | ||
| 53 | |||
| 54 | #ifndef _UAPI_SCTP_H | ||
| 55 | #define _UAPI_SCTP_H | ||
| 56 | |||
| 57 | #include <linux/types.h> | ||
| 58 | #include <linux/socket.h> | ||
| 59 | |||
| 60 | typedef __s32 sctp_assoc_t; | ||
| 61 | |||
| 62 | /* The following symbols come from the Sockets API Extensions for | ||
| 63 | * SCTP <draft-ietf-tsvwg-sctpsocket-07.txt>. | ||
| 64 | */ | ||
| 65 | #define SCTP_RTOINFO 0 | ||
| 66 | #define SCTP_ASSOCINFO 1 | ||
| 67 | #define SCTP_INITMSG 2 | ||
| 68 | #define SCTP_NODELAY 3 /* Get/set nodelay option. */ | ||
| 69 | #define SCTP_AUTOCLOSE 4 | ||
| 70 | #define SCTP_SET_PEER_PRIMARY_ADDR 5 | ||
| 71 | #define SCTP_PRIMARY_ADDR 6 | ||
| 72 | #define SCTP_ADAPTATION_LAYER 7 | ||
| 73 | #define SCTP_DISABLE_FRAGMENTS 8 | ||
| 74 | #define SCTP_PEER_ADDR_PARAMS 9 | ||
| 75 | #define SCTP_DEFAULT_SEND_PARAM 10 | ||
| 76 | #define SCTP_EVENTS 11 | ||
| 77 | #define SCTP_I_WANT_MAPPED_V4_ADDR 12 /* Turn on/off mapped v4 addresses */ | ||
| 78 | #define SCTP_MAXSEG 13 /* Get/set maximum fragment. */ | ||
| 79 | #define SCTP_STATUS 14 | ||
| 80 | #define SCTP_GET_PEER_ADDR_INFO 15 | ||
| 81 | #define SCTP_DELAYED_ACK_TIME 16 | ||
| 82 | #define SCTP_DELAYED_ACK SCTP_DELAYED_ACK_TIME | ||
| 83 | #define SCTP_DELAYED_SACK SCTP_DELAYED_ACK_TIME | ||
| 84 | #define SCTP_CONTEXT 17 | ||
| 85 | #define SCTP_FRAGMENT_INTERLEAVE 18 | ||
| 86 | #define SCTP_PARTIAL_DELIVERY_POINT 19 /* Set/Get partial delivery point */ | ||
| 87 | #define SCTP_MAX_BURST 20 /* Set/Get max burst */ | ||
| 88 | #define SCTP_AUTH_CHUNK 21 /* Set only: add a chunk type to authenticate */ | ||
| 89 | #define SCTP_HMAC_IDENT 22 | ||
| 90 | #define SCTP_AUTH_KEY 23 | ||
| 91 | #define SCTP_AUTH_ACTIVE_KEY 24 | ||
| 92 | #define SCTP_AUTH_DELETE_KEY 25 | ||
| 93 | #define SCTP_PEER_AUTH_CHUNKS 26 /* Read only */ | ||
| 94 | #define SCTP_LOCAL_AUTH_CHUNKS 27 /* Read only */ | ||
| 95 | #define SCTP_GET_ASSOC_NUMBER 28 /* Read only */ | ||
| 96 | #define SCTP_GET_ASSOC_ID_LIST 29 /* Read only */ | ||
| 97 | #define SCTP_AUTO_ASCONF 30 | ||
| 98 | #define SCTP_PEER_ADDR_THLDS 31 | ||
| 99 | |||
| 100 | /* Internal Socket Options. Some of the sctp library functions are | ||
| 101 | * implemented using these socket options. | ||
| 102 | */ | ||
| 103 | #define SCTP_SOCKOPT_BINDX_ADD 100 /* BINDX requests for adding addrs */ | ||
| 104 | #define SCTP_SOCKOPT_BINDX_REM 101 /* BINDX requests for removing addrs. */ | ||
| 105 | #define SCTP_SOCKOPT_PEELOFF 102 /* peel off association. */ | ||
| 106 | /* Options 104-106 are deprecated and removed. Do not use this space */ | ||
| 107 | #define SCTP_SOCKOPT_CONNECTX_OLD 107 /* CONNECTX old requests. */ | ||
| 108 | #define SCTP_GET_PEER_ADDRS 108 /* Get all peer address. */ | ||
| 109 | #define SCTP_GET_LOCAL_ADDRS 109 /* Get all local address. */ | ||
| 110 | #define SCTP_SOCKOPT_CONNECTX 110 /* CONNECTX requests. */ | ||
| 111 | #define SCTP_SOCKOPT_CONNECTX3 111 /* CONNECTX requests (updated) */ | ||
| 112 | #define SCTP_GET_ASSOC_STATS 112 /* Read only */ | ||
| 113 | |||
| 114 | /* | ||
| 115 | * 5.2.1 SCTP Initiation Structure (SCTP_INIT) | ||
| 116 | * | ||
| 117 | * This cmsghdr structure provides information for initializing new | ||
| 118 | * SCTP associations with sendmsg(). The SCTP_INITMSG socket option | ||
| 119 | * uses this same data structure. This structure is not used for | ||
| 120 | * recvmsg(). | ||
| 121 | * | ||
| 122 | * cmsg_level cmsg_type cmsg_data[] | ||
| 123 | * ------------ ------------ ---------------------- | ||
| 124 | * IPPROTO_SCTP SCTP_INIT struct sctp_initmsg | ||
| 125 | * | ||
| 126 | */ | ||
| 127 | struct sctp_initmsg { | ||
| 128 | __u16 sinit_num_ostreams; | ||
| 129 | __u16 sinit_max_instreams; | ||
| 130 | __u16 sinit_max_attempts; | ||
| 131 | __u16 sinit_max_init_timeo; | ||
| 132 | }; | ||
| 133 | |||
| 134 | /* | ||
| 135 | * 5.2.2 SCTP Header Information Structure (SCTP_SNDRCV) | ||
| 136 | * | ||
| 137 | * This cmsghdr structure specifies SCTP options for sendmsg() and | ||
| 138 | * describes SCTP header information about a received message through | ||
| 139 | * recvmsg(). | ||
| 140 | * | ||
| 141 | * cmsg_level cmsg_type cmsg_data[] | ||
| 142 | * ------------ ------------ ---------------------- | ||
| 143 | * IPPROTO_SCTP SCTP_SNDRCV struct sctp_sndrcvinfo | ||
| 144 | * | ||
| 145 | */ | ||
| 146 | struct sctp_sndrcvinfo { | ||
| 147 | __u16 sinfo_stream; | ||
| 148 | __u16 sinfo_ssn; | ||
| 149 | __u16 sinfo_flags; | ||
| 150 | __u32 sinfo_ppid; | ||
| 151 | __u32 sinfo_context; | ||
| 152 | __u32 sinfo_timetolive; | ||
| 153 | __u32 sinfo_tsn; | ||
| 154 | __u32 sinfo_cumtsn; | ||
| 155 | sctp_assoc_t sinfo_assoc_id; | ||
| 156 | }; | ||
| 157 | |||
| 158 | /* | ||
| 159 | * sinfo_flags: 16 bits (unsigned integer) | ||
| 160 | * | ||
| 161 | * This field may contain any of the following flags and is composed of | ||
| 162 | * a bitwise OR of these values. | ||
| 163 | */ | ||
| 164 | |||
| 165 | enum sctp_sinfo_flags { | ||
| 166 | SCTP_UNORDERED = 1, /* Send/receive message unordered. */ | ||
| 167 | SCTP_ADDR_OVER = 2, /* Override the primary destination. */ | ||
| 168 | SCTP_ABORT=4, /* Send an ABORT message to the peer. */ | ||
| 169 | SCTP_SACK_IMMEDIATELY = 8, /* SACK should be sent without delay */ | ||
| 170 | SCTP_EOF=MSG_FIN, /* Initiate graceful shutdown process. */ | ||
| 171 | }; | ||
| 172 | |||
| 173 | typedef union { | ||
| 174 | __u8 raw; | ||
| 175 | struct sctp_initmsg init; | ||
| 176 | struct sctp_sndrcvinfo sndrcv; | ||
| 177 | } sctp_cmsg_data_t; | ||
| 178 | |||
| 179 | /* These are cmsg_types. */ | ||
| 180 | typedef enum sctp_cmsg_type { | ||
| 181 | SCTP_INIT, /* 5.2.1 SCTP Initiation Structure */ | ||
| 182 | #define SCTP_INIT SCTP_INIT | ||
| 183 | SCTP_SNDRCV, /* 5.2.2 SCTP Header Information Structure */ | ||
| 184 | #define SCTP_SNDRCV SCTP_SNDRCV | ||
| 185 | } sctp_cmsg_t; | ||
| 186 | |||
| 187 | /* | ||
| 188 | * 5.3.1.1 SCTP_ASSOC_CHANGE | ||
| 189 | * | ||
| 190 | * Communication notifications inform the ULP that an SCTP association | ||
| 191 | * has either begun or ended. The identifier for a new association is | ||
| 192 | * provided by this notificaion. The notification information has the | ||
| 193 | * following format: | ||
| 194 | * | ||
| 195 | */ | ||
| 196 | struct sctp_assoc_change { | ||
| 197 | __u16 sac_type; | ||
| 198 | __u16 sac_flags; | ||
| 199 | __u32 sac_length; | ||
| 200 | __u16 sac_state; | ||
| 201 | __u16 sac_error; | ||
| 202 | __u16 sac_outbound_streams; | ||
| 203 | __u16 sac_inbound_streams; | ||
| 204 | sctp_assoc_t sac_assoc_id; | ||
| 205 | __u8 sac_info[0]; | ||
| 206 | }; | ||
| 207 | |||
| 208 | /* | ||
| 209 | * sac_state: 32 bits (signed integer) | ||
| 210 | * | ||
| 211 | * This field holds one of a number of values that communicate the | ||
| 212 | * event that happened to the association. They include: | ||
| 213 | * | ||
| 214 | * Note: The following state names deviate from the API draft as | ||
| 215 | * the names clash too easily with other kernel symbols. | ||
| 216 | */ | ||
| 217 | enum sctp_sac_state { | ||
| 218 | SCTP_COMM_UP, | ||
| 219 | SCTP_COMM_LOST, | ||
| 220 | SCTP_RESTART, | ||
| 221 | SCTP_SHUTDOWN_COMP, | ||
| 222 | SCTP_CANT_STR_ASSOC, | ||
| 223 | }; | ||
| 224 | |||
| 225 | /* | ||
| 226 | * 5.3.1.2 SCTP_PEER_ADDR_CHANGE | ||
| 227 | * | ||
| 228 | * When a destination address on a multi-homed peer encounters a change | ||
| 229 | * an interface details event is sent. The information has the | ||
| 230 | * following structure: | ||
| 231 | */ | ||
| 232 | struct sctp_paddr_change { | ||
| 233 | __u16 spc_type; | ||
| 234 | __u16 spc_flags; | ||
| 235 | __u32 spc_length; | ||
| 236 | struct sockaddr_storage spc_aaddr; | ||
| 237 | int spc_state; | ||
| 238 | int spc_error; | ||
| 239 | sctp_assoc_t spc_assoc_id; | ||
| 240 | } __attribute__((packed, aligned(4))); | ||
| 241 | |||
| 242 | /* | ||
| 243 | * spc_state: 32 bits (signed integer) | ||
| 244 | * | ||
| 245 | * This field holds one of a number of values that communicate the | ||
| 246 | * event that happened to the address. They include: | ||
| 247 | */ | ||
| 248 | enum sctp_spc_state { | ||
| 249 | SCTP_ADDR_AVAILABLE, | ||
| 250 | SCTP_ADDR_UNREACHABLE, | ||
| 251 | SCTP_ADDR_REMOVED, | ||
| 252 | SCTP_ADDR_ADDED, | ||
| 253 | SCTP_ADDR_MADE_PRIM, | ||
| 254 | SCTP_ADDR_CONFIRMED, | ||
| 255 | }; | ||
| 256 | |||
| 257 | |||
| 258 | /* | ||
| 259 | * 5.3.1.3 SCTP_REMOTE_ERROR | ||
| 260 | * | ||
| 261 | * A remote peer may send an Operational Error message to its peer. | ||
| 262 | * This message indicates a variety of error conditions on an | ||
| 263 | * association. The entire error TLV as it appears on the wire is | ||
| 264 | * included in a SCTP_REMOTE_ERROR event. Please refer to the SCTP | ||
| 265 | * specification [SCTP] and any extensions for a list of possible | ||
| 266 | * error formats. SCTP error TLVs have the format: | ||
| 267 | */ | ||
| 268 | struct sctp_remote_error { | ||
| 269 | __u16 sre_type; | ||
| 270 | __u16 sre_flags; | ||
| 271 | __u32 sre_length; | ||
| 272 | __u16 sre_error; | ||
| 273 | sctp_assoc_t sre_assoc_id; | ||
| 274 | __u8 sre_data[0]; | ||
| 275 | }; | ||
| 276 | |||
| 277 | |||
| 278 | /* | ||
| 279 | * 5.3.1.4 SCTP_SEND_FAILED | ||
| 280 | * | ||
| 281 | * If SCTP cannot deliver a message it may return the message as a | ||
| 282 | * notification. | ||
| 283 | */ | ||
| 284 | struct sctp_send_failed { | ||
| 285 | __u16 ssf_type; | ||
| 286 | __u16 ssf_flags; | ||
| 287 | __u32 ssf_length; | ||
| 288 | __u32 ssf_error; | ||
| 289 | struct sctp_sndrcvinfo ssf_info; | ||
| 290 | sctp_assoc_t ssf_assoc_id; | ||
| 291 | __u8 ssf_data[0]; | ||
| 292 | }; | ||
| 293 | |||
| 294 | /* | ||
| 295 | * ssf_flags: 16 bits (unsigned integer) | ||
| 296 | * | ||
| 297 | * The flag value will take one of the following values | ||
| 298 | * | ||
| 299 | * SCTP_DATA_UNSENT - Indicates that the data was never put on | ||
| 300 | * the wire. | ||
| 301 | * | ||
| 302 | * SCTP_DATA_SENT - Indicates that the data was put on the wire. | ||
| 303 | * Note that this does not necessarily mean that the | ||
| 304 | * data was (or was not) successfully delivered. | ||
| 305 | */ | ||
| 306 | enum sctp_ssf_flags { | ||
| 307 | SCTP_DATA_UNSENT, | ||
| 308 | SCTP_DATA_SENT, | ||
| 309 | }; | ||
| 310 | |||
| 311 | /* | ||
| 312 | * 5.3.1.5 SCTP_SHUTDOWN_EVENT | ||
| 313 | * | ||
| 314 | * When a peer sends a SHUTDOWN, SCTP delivers this notification to | ||
| 315 | * inform the application that it should cease sending data. | ||
| 316 | */ | ||
| 317 | struct sctp_shutdown_event { | ||
| 318 | __u16 sse_type; | ||
| 319 | __u16 sse_flags; | ||
| 320 | __u32 sse_length; | ||
| 321 | sctp_assoc_t sse_assoc_id; | ||
| 322 | }; | ||
| 323 | |||
| 324 | /* | ||
| 325 | * 5.3.1.6 SCTP_ADAPTATION_INDICATION | ||
| 326 | * | ||
| 327 | * When a peer sends a Adaptation Layer Indication parameter , SCTP | ||
| 328 | * delivers this notification to inform the application | ||
| 329 | * that of the peers requested adaptation layer. | ||
| 330 | */ | ||
| 331 | struct sctp_adaptation_event { | ||
| 332 | __u16 sai_type; | ||
| 333 | __u16 sai_flags; | ||
| 334 | __u32 sai_length; | ||
| 335 | __u32 sai_adaptation_ind; | ||
| 336 | sctp_assoc_t sai_assoc_id; | ||
| 337 | }; | ||
| 338 | |||
| 339 | /* | ||
| 340 | * 5.3.1.7 SCTP_PARTIAL_DELIVERY_EVENT | ||
| 341 | * | ||
| 342 | * When a receiver is engaged in a partial delivery of a | ||
| 343 | * message this notification will be used to indicate | ||
| 344 | * various events. | ||
| 345 | */ | ||
| 346 | struct sctp_pdapi_event { | ||
| 347 | __u16 pdapi_type; | ||
| 348 | __u16 pdapi_flags; | ||
| 349 | __u32 pdapi_length; | ||
| 350 | __u32 pdapi_indication; | ||
| 351 | sctp_assoc_t pdapi_assoc_id; | ||
| 352 | }; | ||
| 353 | |||
| 354 | enum { SCTP_PARTIAL_DELIVERY_ABORTED=0, }; | ||
| 355 | |||
| 356 | /* | ||
| 357 | * 5.3.1.8. SCTP_AUTHENTICATION_EVENT | ||
| 358 | * | ||
| 359 | * When a receiver is using authentication this message will provide | ||
| 360 | * notifications regarding new keys being made active as well as errors. | ||
| 361 | */ | ||
| 362 | struct sctp_authkey_event { | ||
| 363 | __u16 auth_type; | ||
| 364 | __u16 auth_flags; | ||
| 365 | __u32 auth_length; | ||
| 366 | __u16 auth_keynumber; | ||
| 367 | __u16 auth_altkeynumber; | ||
| 368 | __u32 auth_indication; | ||
| 369 | sctp_assoc_t auth_assoc_id; | ||
| 370 | }; | ||
| 371 | |||
| 372 | enum { SCTP_AUTH_NEWKEY = 0, }; | ||
| 373 | |||
| 374 | /* | ||
| 375 | * 6.1.9. SCTP_SENDER_DRY_EVENT | ||
| 376 | * | ||
| 377 | * When the SCTP stack has no more user data to send or retransmit, this | ||
| 378 | * notification is given to the user. Also, at the time when a user app | ||
| 379 | * subscribes to this event, if there is no data to be sent or | ||
| 380 | * retransmit, the stack will immediately send up this notification. | ||
| 381 | */ | ||
| 382 | struct sctp_sender_dry_event { | ||
| 383 | __u16 sender_dry_type; | ||
| 384 | __u16 sender_dry_flags; | ||
| 385 | __u32 sender_dry_length; | ||
| 386 | sctp_assoc_t sender_dry_assoc_id; | ||
| 387 | }; | ||
| 388 | |||
| 389 | /* | ||
| 390 | * Described in Section 7.3 | ||
| 391 | * Ancillary Data and Notification Interest Options | ||
| 392 | */ | ||
| 393 | struct sctp_event_subscribe { | ||
| 394 | __u8 sctp_data_io_event; | ||
| 395 | __u8 sctp_association_event; | ||
| 396 | __u8 sctp_address_event; | ||
| 397 | __u8 sctp_send_failure_event; | ||
| 398 | __u8 sctp_peer_error_event; | ||
| 399 | __u8 sctp_shutdown_event; | ||
| 400 | __u8 sctp_partial_delivery_event; | ||
| 401 | __u8 sctp_adaptation_layer_event; | ||
| 402 | __u8 sctp_authentication_event; | ||
| 403 | __u8 sctp_sender_dry_event; | ||
| 404 | }; | ||
| 405 | |||
| 406 | /* | ||
| 407 | * 5.3.1 SCTP Notification Structure | ||
| 408 | * | ||
| 409 | * The notification structure is defined as the union of all | ||
| 410 | * notification types. | ||
| 411 | * | ||
| 412 | */ | ||
| 413 | union sctp_notification { | ||
| 414 | struct { | ||
| 415 | __u16 sn_type; /* Notification type. */ | ||
| 416 | __u16 sn_flags; | ||
| 417 | __u32 sn_length; | ||
| 418 | } sn_header; | ||
| 419 | struct sctp_assoc_change sn_assoc_change; | ||
| 420 | struct sctp_paddr_change sn_paddr_change; | ||
| 421 | struct sctp_remote_error sn_remote_error; | ||
| 422 | struct sctp_send_failed sn_send_failed; | ||
| 423 | struct sctp_shutdown_event sn_shutdown_event; | ||
| 424 | struct sctp_adaptation_event sn_adaptation_event; | ||
| 425 | struct sctp_pdapi_event sn_pdapi_event; | ||
| 426 | struct sctp_authkey_event sn_authkey_event; | ||
| 427 | struct sctp_sender_dry_event sn_sender_dry_event; | ||
| 428 | }; | ||
| 429 | |||
| 430 | /* Section 5.3.1 | ||
| 431 | * All standard values for sn_type flags are greater than 2^15. | ||
| 432 | * Values from 2^15 and down are reserved. | ||
| 433 | */ | ||
| 434 | |||
| 435 | enum sctp_sn_type { | ||
| 436 | SCTP_SN_TYPE_BASE = (1<<15), | ||
| 437 | SCTP_ASSOC_CHANGE, | ||
| 438 | #define SCTP_ASSOC_CHANGE SCTP_ASSOC_CHANGE | ||
| 439 | SCTP_PEER_ADDR_CHANGE, | ||
| 440 | #define SCTP_PEER_ADDR_CHANGE SCTP_PEER_ADDR_CHANGE | ||
| 441 | SCTP_SEND_FAILED, | ||
| 442 | #define SCTP_SEND_FAILED SCTP_SEND_FAILED | ||
| 443 | SCTP_REMOTE_ERROR, | ||
| 444 | #define SCTP_REMOTE_ERROR SCTP_REMOTE_ERROR | ||
| 445 | SCTP_SHUTDOWN_EVENT, | ||
| 446 | #define SCTP_SHUTDOWN_EVENT SCTP_SHUTDOWN_EVENT | ||
| 447 | SCTP_PARTIAL_DELIVERY_EVENT, | ||
| 448 | #define SCTP_PARTIAL_DELIVERY_EVENT SCTP_PARTIAL_DELIVERY_EVENT | ||
| 449 | SCTP_ADAPTATION_INDICATION, | ||
| 450 | #define SCTP_ADAPTATION_INDICATION SCTP_ADAPTATION_INDICATION | ||
| 451 | SCTP_AUTHENTICATION_EVENT, | ||
| 452 | #define SCTP_AUTHENTICATION_INDICATION SCTP_AUTHENTICATION_EVENT | ||
| 453 | SCTP_SENDER_DRY_EVENT, | ||
| 454 | #define SCTP_SENDER_DRY_EVENT SCTP_SENDER_DRY_EVENT | ||
| 455 | }; | ||
| 456 | |||
| 457 | /* Notification error codes used to fill up the error fields in some | ||
| 458 | * notifications. | ||
| 459 | * SCTP_PEER_ADDRESS_CHAGE : spc_error | ||
| 460 | * SCTP_ASSOC_CHANGE : sac_error | ||
| 461 | * These names should be potentially included in the draft 04 of the SCTP | ||
| 462 | * sockets API specification. | ||
| 463 | */ | ||
| 464 | typedef enum sctp_sn_error { | ||
| 465 | SCTP_FAILED_THRESHOLD, | ||
| 466 | SCTP_RECEIVED_SACK, | ||
| 467 | SCTP_HEARTBEAT_SUCCESS, | ||
| 468 | SCTP_RESPONSE_TO_USER_REQ, | ||
| 469 | SCTP_INTERNAL_ERROR, | ||
| 470 | SCTP_SHUTDOWN_GUARD_EXPIRES, | ||
| 471 | SCTP_PEER_FAULTY, | ||
| 472 | } sctp_sn_error_t; | ||
| 473 | |||
| 474 | /* | ||
| 475 | * 7.1.1 Retransmission Timeout Parameters (SCTP_RTOINFO) | ||
| 476 | * | ||
| 477 | * The protocol parameters used to initialize and bound retransmission | ||
| 478 | * timeout (RTO) are tunable. See [SCTP] for more information on how | ||
| 479 | * these parameters are used in RTO calculation. | ||
| 480 | */ | ||
| 481 | struct sctp_rtoinfo { | ||
| 482 | sctp_assoc_t srto_assoc_id; | ||
| 483 | __u32 srto_initial; | ||
| 484 | __u32 srto_max; | ||
| 485 | __u32 srto_min; | ||
| 486 | }; | ||
| 487 | |||
| 488 | /* | ||
| 489 | * 7.1.2 Association Parameters (SCTP_ASSOCINFO) | ||
| 490 | * | ||
| 491 | * This option is used to both examine and set various association and | ||
| 492 | * endpoint parameters. | ||
| 493 | */ | ||
| 494 | struct sctp_assocparams { | ||
| 495 | sctp_assoc_t sasoc_assoc_id; | ||
| 496 | __u16 sasoc_asocmaxrxt; | ||
| 497 | __u16 sasoc_number_peer_destinations; | ||
| 498 | __u32 sasoc_peer_rwnd; | ||
| 499 | __u32 sasoc_local_rwnd; | ||
| 500 | __u32 sasoc_cookie_life; | ||
| 501 | }; | ||
| 502 | |||
| 503 | /* | ||
| 504 | * 7.1.9 Set Peer Primary Address (SCTP_SET_PEER_PRIMARY_ADDR) | ||
| 505 | * | ||
| 506 | * Requests that the peer mark the enclosed address as the association | ||
| 507 | * primary. The enclosed address must be one of the association's | ||
| 508 | * locally bound addresses. The following structure is used to make a | ||
| 509 | * set primary request: | ||
| 510 | */ | ||
| 511 | struct sctp_setpeerprim { | ||
| 512 | sctp_assoc_t sspp_assoc_id; | ||
| 513 | struct sockaddr_storage sspp_addr; | ||
| 514 | } __attribute__((packed, aligned(4))); | ||
| 515 | |||
| 516 | /* | ||
| 517 | * 7.1.10 Set Primary Address (SCTP_PRIMARY_ADDR) | ||
| 518 | * | ||
| 519 | * Requests that the local SCTP stack use the enclosed peer address as | ||
| 520 | * the association primary. The enclosed address must be one of the | ||
| 521 | * association peer's addresses. The following structure is used to | ||
| 522 | * make a set peer primary request: | ||
| 523 | */ | ||
| 524 | struct sctp_prim { | ||
| 525 | sctp_assoc_t ssp_assoc_id; | ||
| 526 | struct sockaddr_storage ssp_addr; | ||
| 527 | } __attribute__((packed, aligned(4))); | ||
| 528 | |||
| 529 | /* For backward compatibility use, define the old name too */ | ||
| 530 | #define sctp_setprim sctp_prim | ||
| 531 | |||
| 532 | /* | ||
| 533 | * 7.1.11 Set Adaptation Layer Indicator (SCTP_ADAPTATION_LAYER) | ||
| 534 | * | ||
| 535 | * Requests that the local endpoint set the specified Adaptation Layer | ||
| 536 | * Indication parameter for all future INIT and INIT-ACK exchanges. | ||
| 537 | */ | ||
| 538 | struct sctp_setadaptation { | ||
| 539 | __u32 ssb_adaptation_ind; | ||
| 540 | }; | ||
| 541 | |||
| 542 | /* | ||
| 543 | * 7.1.13 Peer Address Parameters (SCTP_PEER_ADDR_PARAMS) | ||
| 544 | * | ||
| 545 | * Applications can enable or disable heartbeats for any peer address | ||
| 546 | * of an association, modify an address's heartbeat interval, force a | ||
| 547 | * heartbeat to be sent immediately, and adjust the address's maximum | ||
| 548 | * number of retransmissions sent before an address is considered | ||
| 549 | * unreachable. The following structure is used to access and modify an | ||
| 550 | * address's parameters: | ||
| 551 | */ | ||
| 552 | enum sctp_spp_flags { | ||
| 553 | SPP_HB_ENABLE = 1<<0, /*Enable heartbeats*/ | ||
| 554 | SPP_HB_DISABLE = 1<<1, /*Disable heartbeats*/ | ||
| 555 | SPP_HB = SPP_HB_ENABLE | SPP_HB_DISABLE, | ||
| 556 | SPP_HB_DEMAND = 1<<2, /*Send heartbeat immediately*/ | ||
| 557 | SPP_PMTUD_ENABLE = 1<<3, /*Enable PMTU discovery*/ | ||
| 558 | SPP_PMTUD_DISABLE = 1<<4, /*Disable PMTU discovery*/ | ||
| 559 | SPP_PMTUD = SPP_PMTUD_ENABLE | SPP_PMTUD_DISABLE, | ||
| 560 | SPP_SACKDELAY_ENABLE = 1<<5, /*Enable SACK*/ | ||
| 561 | SPP_SACKDELAY_DISABLE = 1<<6, /*Disable SACK*/ | ||
| 562 | SPP_SACKDELAY = SPP_SACKDELAY_ENABLE | SPP_SACKDELAY_DISABLE, | ||
| 563 | SPP_HB_TIME_IS_ZERO = 1<<7, /* Set HB delay to 0 */ | ||
| 564 | }; | ||
| 565 | |||
| 566 | struct sctp_paddrparams { | ||
| 567 | sctp_assoc_t spp_assoc_id; | ||
| 568 | struct sockaddr_storage spp_address; | ||
| 569 | __u32 spp_hbinterval; | ||
| 570 | __u16 spp_pathmaxrxt; | ||
| 571 | __u32 spp_pathmtu; | ||
| 572 | __u32 spp_sackdelay; | ||
| 573 | __u32 spp_flags; | ||
| 574 | } __attribute__((packed, aligned(4))); | ||
| 575 | |||
| 576 | /* | ||
| 577 | * 7.1.18. Add a chunk that must be authenticated (SCTP_AUTH_CHUNK) | ||
| 578 | * | ||
| 579 | * This set option adds a chunk type that the user is requesting to be | ||
| 580 | * received only in an authenticated way. Changes to the list of chunks | ||
| 581 | * will only effect future associations on the socket. | ||
| 582 | */ | ||
| 583 | struct sctp_authchunk { | ||
| 584 | __u8 sauth_chunk; | ||
| 585 | }; | ||
| 586 | |||
| 587 | /* | ||
| 588 | * 7.1.19. Get or set the list of supported HMAC Identifiers (SCTP_HMAC_IDENT) | ||
| 589 | * | ||
| 590 | * This option gets or sets the list of HMAC algorithms that the local | ||
| 591 | * endpoint requires the peer to use. | ||
| 592 | */ | ||
| 593 | #ifndef __KERNEL__ | ||
| 594 | /* This here is only used by user space as is. It might not be a good idea | ||
| 595 | * to export/reveal the whole structure with reserved fields etc. | ||
| 596 | */ | ||
| 597 | enum { | ||
| 598 | SCTP_AUTH_HMAC_ID_SHA1 = 1, | ||
| 599 | SCTP_AUTH_HMAC_ID_SHA256 = 3, | ||
| 600 | }; | ||
| 601 | #endif | ||
| 602 | |||
| 603 | struct sctp_hmacalgo { | ||
| 604 | __u32 shmac_num_idents; | ||
| 605 | __u16 shmac_idents[]; | ||
| 606 | }; | ||
| 607 | |||
| 608 | /* Sadly, user and kernel space have different names for | ||
| 609 | * this structure member, so this is to not break anything. | ||
| 610 | */ | ||
| 611 | #define shmac_number_of_idents shmac_num_idents | ||
| 612 | |||
| 613 | /* | ||
| 614 | * 7.1.20. Set a shared key (SCTP_AUTH_KEY) | ||
| 615 | * | ||
| 616 | * This option will set a shared secret key which is used to build an | ||
| 617 | * association shared key. | ||
| 618 | */ | ||
| 619 | struct sctp_authkey { | ||
| 620 | sctp_assoc_t sca_assoc_id; | ||
| 621 | __u16 sca_keynumber; | ||
| 622 | __u16 sca_keylength; | ||
| 623 | __u8 sca_key[]; | ||
| 624 | }; | ||
| 625 | |||
| 626 | /* | ||
| 627 | * 7.1.21. Get or set the active shared key (SCTP_AUTH_ACTIVE_KEY) | ||
| 628 | * | ||
| 629 | * This option will get or set the active shared key to be used to build | ||
| 630 | * the association shared key. | ||
| 631 | */ | ||
| 632 | |||
| 633 | struct sctp_authkeyid { | ||
| 634 | sctp_assoc_t scact_assoc_id; | ||
| 635 | __u16 scact_keynumber; | ||
| 636 | }; | ||
| 637 | |||
| 638 | |||
| 639 | /* | ||
| 640 | * 7.1.23. Get or set delayed ack timer (SCTP_DELAYED_SACK) | ||
| 641 | * | ||
| 642 | * This option will effect the way delayed acks are performed. This | ||
| 643 | * option allows you to get or set the delayed ack time, in | ||
| 644 | * milliseconds. It also allows changing the delayed ack frequency. | ||
| 645 | * Changing the frequency to 1 disables the delayed sack algorithm. If | ||
| 646 | * the assoc_id is 0, then this sets or gets the endpoints default | ||
| 647 | * values. If the assoc_id field is non-zero, then the set or get | ||
| 648 | * effects the specified association for the one to many model (the | ||
| 649 | * assoc_id field is ignored by the one to one model). Note that if | ||
| 650 | * sack_delay or sack_freq are 0 when setting this option, then the | ||
| 651 | * current values will remain unchanged. | ||
| 652 | */ | ||
| 653 | struct sctp_sack_info { | ||
| 654 | sctp_assoc_t sack_assoc_id; | ||
| 655 | uint32_t sack_delay; | ||
| 656 | uint32_t sack_freq; | ||
| 657 | }; | ||
| 658 | |||
| 659 | struct sctp_assoc_value { | ||
| 660 | sctp_assoc_t assoc_id; | ||
| 661 | uint32_t assoc_value; | ||
| 662 | }; | ||
| 663 | |||
| 664 | /* | ||
| 665 | * 7.2.2 Peer Address Information | ||
| 666 | * | ||
| 667 | * Applications can retrieve information about a specific peer address | ||
| 668 | * of an association, including its reachability state, congestion | ||
| 669 | * window, and retransmission timer values. This information is | ||
| 670 | * read-only. The following structure is used to access this | ||
| 671 | * information: | ||
| 672 | */ | ||
| 673 | struct sctp_paddrinfo { | ||
| 674 | sctp_assoc_t spinfo_assoc_id; | ||
| 675 | struct sockaddr_storage spinfo_address; | ||
| 676 | __s32 spinfo_state; | ||
| 677 | __u32 spinfo_cwnd; | ||
| 678 | __u32 spinfo_srtt; | ||
| 679 | __u32 spinfo_rto; | ||
| 680 | __u32 spinfo_mtu; | ||
| 681 | } __attribute__((packed, aligned(4))); | ||
| 682 | |||
| 683 | /* Peer addresses's state. */ | ||
| 684 | /* UNKNOWN: Peer address passed by the upper layer in sendmsg or connect[x] | ||
| 685 | * calls. | ||
| 686 | * UNCONFIRMED: Peer address received in INIT/INIT-ACK address parameters. | ||
| 687 | * Not yet confirmed by a heartbeat and not available for data | ||
| 688 | * transfers. | ||
| 689 | * ACTIVE : Peer address confirmed, active and available for data transfers. | ||
| 690 | * INACTIVE: Peer address inactive and not available for data transfers. | ||
| 691 | */ | ||
| 692 | enum sctp_spinfo_state { | ||
| 693 | SCTP_INACTIVE, | ||
| 694 | SCTP_PF, | ||
| 695 | SCTP_ACTIVE, | ||
| 696 | SCTP_UNCONFIRMED, | ||
| 697 | SCTP_UNKNOWN = 0xffff /* Value used for transport state unknown */ | ||
| 698 | }; | ||
| 699 | |||
| 700 | /* | ||
| 701 | * 7.2.1 Association Status (SCTP_STATUS) | ||
| 702 | * | ||
| 703 | * Applications can retrieve current status information about an | ||
| 704 | * association, including association state, peer receiver window size, | ||
| 705 | * number of unacked data chunks, and number of data chunks pending | ||
| 706 | * receipt. This information is read-only. The following structure is | ||
| 707 | * used to access this information: | ||
| 708 | */ | ||
| 709 | struct sctp_status { | ||
| 710 | sctp_assoc_t sstat_assoc_id; | ||
| 711 | __s32 sstat_state; | ||
| 712 | __u32 sstat_rwnd; | ||
| 713 | __u16 sstat_unackdata; | ||
| 714 | __u16 sstat_penddata; | ||
| 715 | __u16 sstat_instrms; | ||
| 716 | __u16 sstat_outstrms; | ||
| 717 | __u32 sstat_fragmentation_point; | ||
| 718 | struct sctp_paddrinfo sstat_primary; | ||
| 719 | }; | ||
| 720 | |||
| 721 | /* | ||
| 722 | * 7.2.3. Get the list of chunks the peer requires to be authenticated | ||
| 723 | * (SCTP_PEER_AUTH_CHUNKS) | ||
| 724 | * | ||
| 725 | * This option gets a list of chunks for a specified association that | ||
| 726 | * the peer requires to be received authenticated only. | ||
| 727 | */ | ||
| 728 | struct sctp_authchunks { | ||
| 729 | sctp_assoc_t gauth_assoc_id; | ||
| 730 | __u32 gauth_number_of_chunks; | ||
| 731 | uint8_t gauth_chunks[]; | ||
| 732 | }; | ||
| 733 | |||
| 734 | /* The broken spelling has been released already in lksctp-tools header, | ||
| 735 | * so don't break anyone, now that it's fixed. | ||
| 736 | */ | ||
| 737 | #define guth_number_of_chunks gauth_number_of_chunks | ||
| 738 | |||
| 739 | /* Association states. */ | ||
| 740 | enum sctp_sstat_state { | ||
| 741 | SCTP_EMPTY = 0, | ||
| 742 | SCTP_CLOSED = 1, | ||
| 743 | SCTP_COOKIE_WAIT = 2, | ||
| 744 | SCTP_COOKIE_ECHOED = 3, | ||
| 745 | SCTP_ESTABLISHED = 4, | ||
| 746 | SCTP_SHUTDOWN_PENDING = 5, | ||
| 747 | SCTP_SHUTDOWN_SENT = 6, | ||
| 748 | SCTP_SHUTDOWN_RECEIVED = 7, | ||
| 749 | SCTP_SHUTDOWN_ACK_SENT = 8, | ||
| 750 | }; | ||
| 751 | |||
| 752 | /* | ||
| 753 | * 8.2.6. Get the Current Identifiers of Associations | ||
| 754 | * (SCTP_GET_ASSOC_ID_LIST) | ||
| 755 | * | ||
| 756 | * This option gets the current list of SCTP association identifiers of | ||
| 757 | * the SCTP associations handled by a one-to-many style socket. | ||
| 758 | */ | ||
| 759 | struct sctp_assoc_ids { | ||
| 760 | __u32 gaids_number_of_ids; | ||
| 761 | sctp_assoc_t gaids_assoc_id[]; | ||
| 762 | }; | ||
| 763 | |||
| 764 | /* | ||
| 765 | * 8.3, 8.5 get all peer/local addresses in an association. | ||
| 766 | * This parameter struct is used by SCTP_GET_PEER_ADDRS and | ||
| 767 | * SCTP_GET_LOCAL_ADDRS socket options used internally to implement | ||
| 768 | * sctp_getpaddrs() and sctp_getladdrs() API. | ||
| 769 | */ | ||
| 770 | struct sctp_getaddrs_old { | ||
| 771 | sctp_assoc_t assoc_id; | ||
| 772 | int addr_num; | ||
| 773 | #ifdef __KERNEL__ | ||
| 774 | struct sockaddr __user *addrs; | ||
| 775 | #else | ||
| 776 | struct sockaddr *addrs; | ||
| 777 | #endif | ||
| 778 | }; | ||
| 779 | |||
| 780 | struct sctp_getaddrs { | ||
| 781 | sctp_assoc_t assoc_id; /*input*/ | ||
| 782 | __u32 addr_num; /*output*/ | ||
| 783 | __u8 addrs[0]; /*output, variable size*/ | ||
| 784 | }; | ||
| 785 | |||
| 786 | /* A socket user request obtained via SCTP_GET_ASSOC_STATS that retrieves | ||
| 787 | * association stats. All stats are counts except sas_maxrto and | ||
| 788 | * sas_obs_rto_ipaddr. maxrto is the max observed rto + transport since | ||
| 789 | * the last call. Will return 0 when RTO was not update since last call | ||
| 790 | */ | ||
| 791 | struct sctp_assoc_stats { | ||
| 792 | sctp_assoc_t sas_assoc_id; /* Input */ | ||
| 793 | /* Transport of observed max RTO */ | ||
| 794 | struct sockaddr_storage sas_obs_rto_ipaddr; | ||
| 795 | __u64 sas_maxrto; /* Maximum Observed RTO for period */ | ||
| 796 | __u64 sas_isacks; /* SACKs received */ | ||
| 797 | __u64 sas_osacks; /* SACKs sent */ | ||
| 798 | __u64 sas_opackets; /* Packets sent */ | ||
| 799 | __u64 sas_ipackets; /* Packets received */ | ||
| 800 | __u64 sas_rtxchunks; /* Retransmitted Chunks */ | ||
| 801 | __u64 sas_outofseqtsns;/* TSN received > next expected */ | ||
| 802 | __u64 sas_idupchunks; /* Dups received (ordered+unordered) */ | ||
| 803 | __u64 sas_gapcnt; /* Gap Acknowledgements Received */ | ||
| 804 | __u64 sas_ouodchunks; /* Unordered data chunks sent */ | ||
| 805 | __u64 sas_iuodchunks; /* Unordered data chunks received */ | ||
| 806 | __u64 sas_oodchunks; /* Ordered data chunks sent */ | ||
| 807 | __u64 sas_iodchunks; /* Ordered data chunks received */ | ||
| 808 | __u64 sas_octrlchunks; /* Control chunks sent */ | ||
| 809 | __u64 sas_ictrlchunks; /* Control chunks received */ | ||
| 810 | }; | ||
| 811 | |||
| 812 | /* These are bit fields for msghdr->msg_flags. See section 5.1. */ | ||
| 813 | /* On user space Linux, these live in <bits/socket.h> as an enum. */ | ||
| 814 | enum sctp_msg_flags { | ||
| 815 | MSG_NOTIFICATION = 0x8000, | ||
| 816 | #define MSG_NOTIFICATION MSG_NOTIFICATION | ||
| 817 | }; | ||
| 818 | |||
| 819 | /* | ||
| 820 | * 8.1 sctp_bindx() | ||
| 821 | * | ||
| 822 | * The flags parameter is formed from the bitwise OR of zero or more of the | ||
| 823 | * following currently defined flags: | ||
| 824 | */ | ||
| 825 | #define SCTP_BINDX_ADD_ADDR 0x01 | ||
| 826 | #define SCTP_BINDX_REM_ADDR 0x02 | ||
| 827 | |||
| 828 | /* This is the structure that is passed as an argument(optval) to | ||
| 829 | * getsockopt(SCTP_SOCKOPT_PEELOFF). | ||
| 830 | */ | ||
| 831 | typedef struct { | ||
| 832 | sctp_assoc_t associd; | ||
| 833 | int sd; | ||
| 834 | } sctp_peeloff_arg_t; | ||
| 835 | |||
| 836 | /* | ||
| 837 | * Peer Address Thresholds socket option | ||
| 838 | */ | ||
| 839 | struct sctp_paddrthlds { | ||
| 840 | sctp_assoc_t spt_assoc_id; | ||
| 841 | struct sockaddr_storage spt_address; | ||
| 842 | __u16 spt_pathmaxrxt; | ||
| 843 | __u16 spt_pathpfthld; | ||
| 844 | }; | ||
| 845 | |||
| 846 | #endif /* _UAPI_SCTP_H */ | ||
diff --git a/include/uapi/linux/serial_core.h b/include/uapi/linux/serial_core.h index b6a23a483d74..74c2bf7211f8 100644 --- a/include/uapi/linux/serial_core.h +++ b/include/uapi/linux/serial_core.h | |||
| @@ -51,7 +51,10 @@ | |||
| 51 | #define PORT_8250_CIR 23 /* CIR infrared port, has its own driver */ | 51 | #define PORT_8250_CIR 23 /* CIR infrared port, has its own driver */ |
| 52 | #define PORT_XR17V35X 24 /* Exar XR17V35x UARTs */ | 52 | #define PORT_XR17V35X 24 /* Exar XR17V35x UARTs */ |
| 53 | #define PORT_BRCM_TRUMANAGE 25 | 53 | #define PORT_BRCM_TRUMANAGE 25 |
| 54 | #define PORT_MAX_8250 25 /* max port ID */ | 54 | #define PORT_ALTR_16550_F32 26 /* Altera 16550 UART with 32 FIFOs */ |
| 55 | #define PORT_ALTR_16550_F64 27 /* Altera 16550 UART with 64 FIFOs */ | ||
| 56 | #define PORT_ALTR_16550_F128 28 /* Altera 16550 UART with 128 FIFOs */ | ||
| 57 | #define PORT_MAX_8250 28 /* max port ID */ | ||
| 55 | 58 | ||
| 56 | /* | 59 | /* |
| 57 | * ARM specific type numbers. These are not currently guaranteed | 60 | * ARM specific type numbers. These are not currently guaranteed |
diff --git a/include/uapi/linux/snmp.h b/include/uapi/linux/snmp.h index b49eab89c9fd..fefdec91c68b 100644 --- a/include/uapi/linux/snmp.h +++ b/include/uapi/linux/snmp.h | |||
| @@ -202,6 +202,8 @@ enum | |||
| 202 | LINUX_MIB_TCPFORWARDRETRANS, /* TCPForwardRetrans */ | 202 | LINUX_MIB_TCPFORWARDRETRANS, /* TCPForwardRetrans */ |
| 203 | LINUX_MIB_TCPSLOWSTARTRETRANS, /* TCPSlowStartRetrans */ | 203 | LINUX_MIB_TCPSLOWSTARTRETRANS, /* TCPSlowStartRetrans */ |
| 204 | LINUX_MIB_TCPTIMEOUTS, /* TCPTimeouts */ | 204 | LINUX_MIB_TCPTIMEOUTS, /* TCPTimeouts */ |
| 205 | LINUX_MIB_TCPLOSSPROBES, /* TCPLossProbes */ | ||
| 206 | LINUX_MIB_TCPLOSSPROBERECOVERY, /* TCPLossProbeRecovery */ | ||
| 205 | LINUX_MIB_TCPRENORECOVERYFAIL, /* TCPRenoRecoveryFail */ | 207 | LINUX_MIB_TCPRENORECOVERYFAIL, /* TCPRenoRecoveryFail */ |
| 206 | LINUX_MIB_TCPSACKRECOVERYFAIL, /* TCPSackRecoveryFail */ | 208 | LINUX_MIB_TCPSACKRECOVERYFAIL, /* TCPSackRecoveryFail */ |
| 207 | LINUX_MIB_TCPSCHEDULERFAILED, /* TCPSchedulerFailed */ | 209 | LINUX_MIB_TCPSCHEDULERFAILED, /* TCPSchedulerFailed */ |
| @@ -245,6 +247,7 @@ enum | |||
| 245 | LINUX_MIB_TCPFASTOPENPASSIVEFAIL, /* TCPFastOpenPassiveFail */ | 247 | LINUX_MIB_TCPFASTOPENPASSIVEFAIL, /* TCPFastOpenPassiveFail */ |
| 246 | LINUX_MIB_TCPFASTOPENLISTENOVERFLOW, /* TCPFastOpenListenOverflow */ | 248 | LINUX_MIB_TCPFASTOPENLISTENOVERFLOW, /* TCPFastOpenListenOverflow */ |
| 247 | LINUX_MIB_TCPFASTOPENCOOKIEREQD, /* TCPFastOpenCookieReqd */ | 249 | LINUX_MIB_TCPFASTOPENCOOKIEREQD, /* TCPFastOpenCookieReqd */ |
| 250 | LINUX_MIB_TCPSPURIOUS_RTX_HOSTQUEUES, /* TCPSpuriousRtxHostQueues */ | ||
| 248 | __LINUX_MIB_MAX | 251 | __LINUX_MIB_MAX |
| 249 | }; | 252 | }; |
| 250 | 253 | ||
diff --git a/include/uapi/linux/tcp.h b/include/uapi/linux/tcp.h index 6b1ead0b0c9d..8d776ebc4829 100644 --- a/include/uapi/linux/tcp.h +++ b/include/uapi/linux/tcp.h | |||
| @@ -102,7 +102,6 @@ enum { | |||
| 102 | #define TCP_QUICKACK 12 /* Block/reenable quick acks */ | 102 | #define TCP_QUICKACK 12 /* Block/reenable quick acks */ |
| 103 | #define TCP_CONGESTION 13 /* Congestion control algorithm */ | 103 | #define TCP_CONGESTION 13 /* Congestion control algorithm */ |
| 104 | #define TCP_MD5SIG 14 /* TCP MD5 Signature (RFC2385) */ | 104 | #define TCP_MD5SIG 14 /* TCP MD5 Signature (RFC2385) */ |
| 105 | #define TCP_COOKIE_TRANSACTIONS 15 /* TCP Cookie Transactions */ | ||
| 106 | #define TCP_THIN_LINEAR_TIMEOUTS 16 /* Use linear timeouts for thin streams*/ | 105 | #define TCP_THIN_LINEAR_TIMEOUTS 16 /* Use linear timeouts for thin streams*/ |
| 107 | #define TCP_THIN_DUPACK 17 /* Fast retrans. after 1 dupack */ | 106 | #define TCP_THIN_DUPACK 17 /* Fast retrans. after 1 dupack */ |
| 108 | #define TCP_USER_TIMEOUT 18 /* How long for loss retry before timeout */ | 107 | #define TCP_USER_TIMEOUT 18 /* How long for loss retry before timeout */ |
| @@ -199,29 +198,4 @@ struct tcp_md5sig { | |||
| 199 | __u8 tcpm_key[TCP_MD5SIG_MAXKEYLEN]; /* key (binary) */ | 198 | __u8 tcpm_key[TCP_MD5SIG_MAXKEYLEN]; /* key (binary) */ |
| 200 | }; | 199 | }; |
| 201 | 200 | ||
| 202 | /* for TCP_COOKIE_TRANSACTIONS (TCPCT) socket option */ | ||
| 203 | #define TCP_COOKIE_MIN 8 /* 64-bits */ | ||
| 204 | #define TCP_COOKIE_MAX 16 /* 128-bits */ | ||
| 205 | #define TCP_COOKIE_PAIR_SIZE (2*TCP_COOKIE_MAX) | ||
| 206 | |||
| 207 | /* Flags for both getsockopt and setsockopt */ | ||
| 208 | #define TCP_COOKIE_IN_ALWAYS (1 << 0) /* Discard SYN without cookie */ | ||
| 209 | #define TCP_COOKIE_OUT_NEVER (1 << 1) /* Prohibit outgoing cookies, | ||
| 210 | * supercedes everything. */ | ||
| 211 | |||
| 212 | /* Flags for getsockopt */ | ||
| 213 | #define TCP_S_DATA_IN (1 << 2) /* Was data received? */ | ||
| 214 | #define TCP_S_DATA_OUT (1 << 3) /* Was data sent? */ | ||
| 215 | |||
| 216 | /* TCP_COOKIE_TRANSACTIONS data */ | ||
| 217 | struct tcp_cookie_transactions { | ||
| 218 | __u16 tcpct_flags; /* see above */ | ||
| 219 | __u8 __tcpct_pad1; /* zero */ | ||
| 220 | __u8 tcpct_cookie_desired; /* bytes */ | ||
| 221 | __u16 tcpct_s_data_desired; /* bytes of variable data */ | ||
| 222 | __u16 tcpct_used; /* bytes in value */ | ||
| 223 | __u8 tcpct_value[TCP_MSS_DEFAULT]; | ||
| 224 | }; | ||
| 225 | |||
| 226 | |||
| 227 | #endif /* _UAPI_LINUX_TCP_H */ | 201 | #endif /* _UAPI_LINUX_TCP_H */ |
diff --git a/include/uapi/linux/unix_diag.h b/include/uapi/linux/unix_diag.h index b8a24941db21..b9e2a6a7446f 100644 --- a/include/uapi/linux/unix_diag.h +++ b/include/uapi/linux/unix_diag.h | |||
| @@ -39,9 +39,11 @@ enum { | |||
| 39 | UNIX_DIAG_MEMINFO, | 39 | UNIX_DIAG_MEMINFO, |
| 40 | UNIX_DIAG_SHUTDOWN, | 40 | UNIX_DIAG_SHUTDOWN, |
| 41 | 41 | ||
| 42 | UNIX_DIAG_MAX, | 42 | __UNIX_DIAG_MAX, |
| 43 | }; | 43 | }; |
| 44 | 44 | ||
| 45 | #define UNIX_DIAG_MAX (__UNIX_DIAG_MAX - 1) | ||
| 46 | |||
| 45 | struct unix_diag_vfs { | 47 | struct unix_diag_vfs { |
| 46 | __u32 udiag_vfs_ino; | 48 | __u32 udiag_vfs_ino; |
| 47 | __u32 udiag_vfs_dev; | 49 | __u32 udiag_vfs_dev; |
diff --git a/include/uapi/linux/vm_sockets.h b/include/uapi/linux/vm_sockets.h index df91301847ec..b4ed5d895699 100644 --- a/include/uapi/linux/vm_sockets.h +++ b/include/uapi/linux/vm_sockets.h | |||
| @@ -13,12 +13,10 @@ | |||
| 13 | * more details. | 13 | * more details. |
| 14 | */ | 14 | */ |
| 15 | 15 | ||
| 16 | #ifndef _VM_SOCKETS_H_ | 16 | #ifndef _UAPI_VM_SOCKETS_H |
| 17 | #define _VM_SOCKETS_H_ | 17 | #define _UAPI_VM_SOCKETS_H |
| 18 | 18 | ||
| 19 | #if !defined(__KERNEL__) | 19 | #include <linux/socket.h> |
| 20 | #include <sys/socket.h> | ||
| 21 | #endif | ||
| 22 | 20 | ||
| 23 | /* Option name for STREAM socket buffer size. Use as the option name in | 21 | /* Option name for STREAM socket buffer size. Use as the option name in |
| 24 | * setsockopt(3) or getsockopt(3) to set or get an unsigned long long that | 22 | * setsockopt(3) or getsockopt(3) to set or get an unsigned long long that |
| @@ -137,14 +135,13 @@ | |||
| 137 | #define VM_SOCKETS_VERSION_MINOR(_v) (((_v) & 0x0000FFFF)) | 135 | #define VM_SOCKETS_VERSION_MINOR(_v) (((_v) & 0x0000FFFF)) |
| 138 | 136 | ||
| 139 | /* Address structure for vSockets. The address family should be set to | 137 | /* Address structure for vSockets. The address family should be set to |
| 140 | * whatever vmci_sock_get_af_value_fd() returns. The structure members should | 138 | * AF_VSOCK. The structure members should all align on their natural |
| 141 | * all align on their natural boundaries without resorting to compiler packing | 139 | * boundaries without resorting to compiler packing directives. The total size |
| 142 | * directives. The total size of this structure should be exactly the same as | 140 | * of this structure should be exactly the same as that of struct sockaddr. |
| 143 | * that of struct sockaddr. | ||
| 144 | */ | 141 | */ |
| 145 | 142 | ||
| 146 | struct sockaddr_vm { | 143 | struct sockaddr_vm { |
| 147 | sa_family_t svm_family; | 144 | __kernel_sa_family_t svm_family; |
| 148 | unsigned short svm_reserved1; | 145 | unsigned short svm_reserved1; |
| 149 | unsigned int svm_port; | 146 | unsigned int svm_port; |
| 150 | unsigned int svm_cid; | 147 | unsigned int svm_cid; |
| @@ -156,8 +153,4 @@ struct sockaddr_vm { | |||
| 156 | 153 | ||
| 157 | #define IOCTL_VM_SOCKETS_GET_LOCAL_CID _IO(7, 0xb9) | 154 | #define IOCTL_VM_SOCKETS_GET_LOCAL_CID _IO(7, 0xb9) |
| 158 | 155 | ||
| 159 | #if defined(__KERNEL__) | 156 | #endif /* _UAPI_VM_SOCKETS_H */ |
| 160 | int vm_sockets_get_local_cid(void); | ||
| 161 | #endif | ||
| 162 | |||
| 163 | #endif | ||
diff --git a/include/uapi/linux/xfrm.h b/include/uapi/linux/xfrm.h index 28e493b5b94c..a8cd6a4a2970 100644 --- a/include/uapi/linux/xfrm.h +++ b/include/uapi/linux/xfrm.h | |||
| @@ -297,6 +297,7 @@ enum xfrm_attr_type_t { | |||
| 297 | XFRMA_MARK, /* struct xfrm_mark */ | 297 | XFRMA_MARK, /* struct xfrm_mark */ |
| 298 | XFRMA_TFCPAD, /* __u32 */ | 298 | XFRMA_TFCPAD, /* __u32 */ |
| 299 | XFRMA_REPLAY_ESN_VAL, /* struct xfrm_replay_esn */ | 299 | XFRMA_REPLAY_ESN_VAL, /* struct xfrm_replay_esn */ |
| 300 | XFRMA_SA_EXTRA_FLAGS, /* __u32 */ | ||
| 300 | __XFRMA_MAX | 301 | __XFRMA_MAX |
| 301 | 302 | ||
| 302 | #define XFRMA_MAX (__XFRMA_MAX - 1) | 303 | #define XFRMA_MAX (__XFRMA_MAX - 1) |
| @@ -367,6 +368,8 @@ struct xfrm_usersa_info { | |||
| 367 | #define XFRM_STATE_ESN 128 | 368 | #define XFRM_STATE_ESN 128 |
| 368 | }; | 369 | }; |
| 369 | 370 | ||
| 371 | #define XFRM_SA_XFLAG_DONT_ENCAP_DSCP 1 | ||
| 372 | |||
| 370 | struct xfrm_usersa_id { | 373 | struct xfrm_usersa_id { |
| 371 | xfrm_address_t daddr; | 374 | xfrm_address_t daddr; |
| 372 | __be32 spi; | 375 | __be32 spi; |
