aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/contrib/examples/embeddable-wg-library/wireguard.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2018-10-09tools: compile on gnu99Jason A. Donenfeld1-1/+1
We don't actually use any C11 features, so we can at least compile with ancient gcc. Reported-by: Aaron M. D. Jones <aaronmdjones@gmail.com>
2018-10-09tools: use libc's endianness macro if no compiler macroJason A. Donenfeld1-0/+10
This lets us be compiled with ancient gcc. Reported-by: Jeff Brandt <jeff@jeffcolo.net>
2018-10-09global: give if statements brackets and other cleanupsJason A. Donenfeld10-27/+40
2018-10-08main: change module descriptionJason A. Donenfeld1-1/+1
Suggested-by: Jiri Pirko <jiri@resnulli.us>
2018-10-08device: use textual error labels alwaysJason A. Donenfeld1-22/+23
Suggested-by: Jiri Pirko <jiri@resnulli.us>
2018-10-08allowedips: swap endianness early onArnd Bergmann1-6/+9
Otherwise if gcc's optimizer is able to look far in but not overly far in, we wind up with "warning: 'key' may be used uninitialized in this function [-Wmaybe-uninitialized]". Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2018-10-08timers: avoid using control statements in macroJason A. Donenfeld1-8/+23
Suggested-by: Andrew Lunn <andrew@lunn.ch>
2018-10-08allowedips: remove control statement from macro by rewritingJason A. Donenfeld1-68/+119
This is a significant rearrangement that makes things less clear, to satisfy a checkpatch.pl requirement. Suggested-by: Andrew Lunn <andrew@lunn.ch>
2018-10-08global: more nitsJason A. Donenfeld17-83/+91
2018-10-08global: rename struct wireguard_ to struct wg_Jason A. Donenfeld23-236/+225
This required a bit of pruning of our christmas trees. Suggested-by: Jiri Pirko <jiri@resnulli.us>
2018-10-08netlink: do not stuff index into nla typeJason A. Donenfeld4-34/+25
It's not used for anything, and LKML doesn't like the type being used as an index value. Suggested-by: Eugene Syromiatnikov <esyr@redhat.com>
2018-10-08qemu: kill after 20 minutesJason A. Donenfeld1-1/+1
2018-10-08compat: look in Kbuild and Makefile since they differ based on archJason A. Donenfeld1-1/+1
2018-10-08create-patch: blacklist instead of whitelistJason A. Donenfeld1-1/+2
This will deal with filename changes more gracefully. Reported-by: Jordan Glover <Golden_Miller83@protonmail.ch>
2018-10-08global: prefix functions used in callbacks with wg_Jason A. Donenfeld9-90/+95
Suggested-by: Jiri Pirko <jiri@resnulli.us>
2018-10-07compat: don't output for grep errorsDavide Garberi1-2/+2
This will make it so that kernels not having arch/$(SRCARCH)/Kbuild no longer give any (non-fatal) grep errors such as "grep: arch/arm64/Kbuild: No such file or directory". Signed-off-by: Davide Garberi <dade.garberi@gmail.com>
2018-10-07version: bump snapshot0.0.20181007Jason A. Donenfeld2-2/+2
2018-10-07global: style nitsJason A. Donenfeld5-32/+30
2018-10-07crypto: clean up remaining .h->.cJason A. Donenfeld11-14/+14
2018-10-07allowedips: document additional nobsJason A. Donenfeld1-0/+12
2018-10-07makefile: do more generic wildcard so as to avoid rename issuesJason A. Donenfeld2-2/+2
Commit ad5e4210 (global: rename include'd C files to be .c) breaks install target for dkms sources. Fix installing selftest/*.c. Suggested-by: Christian Hesse <mail@eworm.de>
2018-10-07crypto: use BIT(i) & bitmap instead of (bitmap >> i) & 1Jason A. Donenfeld1-2/+2
Pros: clearer if you're not familiar with the shift idiom, uses kernel macro. Cons: doesn't work any more if the lvalue ever ceases to be a bool. Neutral: generates the same machine code. Suggested-by: Sultan Alsawaf <sultanxda@gmail.com>
2018-10-07crypto: disable broken implementations in selftestsJason A. Donenfeld1-9/+8
2018-10-07compat: clang cannot handle __builtin_constant_pJason A. Donenfeld1-0/+7
Or, put differently, we don't want to go chasing down random versions of clang used by XDA users, so we just disable this checking on clang all together.
2018-10-07compat: make asm/simd.h conditional on its existenceJason A. Donenfeld5-23/+24
Android kernels backported it, complicating things.
2018-10-06compat: account for ancient ARM assemblerJason A. Donenfeld1-0/+25
2018-10-06version: bump snapshot0.0.20181006Jason A. Donenfeld2-2/+2
2018-10-06crypto: test all SIMD combinationsJason A. Donenfeld20-40/+82
2018-10-06global: rename include'd C files to be .cJason A. Donenfeld25-34/+34
This is done by 259 other files in the kernel tree: linux $ rg '#include.*\.c' -l | wc -l 259 Suggested-by: Sultan Alsawaf <sultanxda@gmail.com>
2018-10-06allowedips: remove ifdefs in favor of IS_ENABLEDJason A. Donenfeld2-20/+34
2018-10-05wg-quick.8: add policy routing exampleJason A. Donenfeld1-0/+26
Suggested-by: Toke Høiland-Jørgensen <toke@toke.dk> Suggested-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2018-10-04curve25519-arm: rearrange multiplications for better in-order performanceJason A. Donenfeld1-12/+12
Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2018-10-04curve25519-arm: writeback to base register when possibleJason A. Donenfeld1-58/+27
Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2018-10-03blake2s: always put a simd, even if not use()'dJason A. Donenfeld1-2/+5
2018-10-03simd: introduce useful disabling macroJason A. Donenfeld3-3/+4
2018-10-03Kconfig: do now allow IPV6=m,WG=yJason A. Donenfeld1-0/+1
2018-10-03curve25519-arm: adjust commentJason A. Donenfeld1-2/+2
2018-10-03curve25519-arm: use new simd apiJason A. Donenfeld1-6/+9
2018-10-02chacha20-arm: use proper reteq macro instead of bxeqJason A. Donenfeld1-1/+2
Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2018-10-02qemu: show more messages in console the right wayJason A. Donenfeld1-1/+1
2018-10-02qemu: support powerpc64leJason A. Donenfeld2-2/+22
This uses ELFv2 ABI, which is the only ppc64 ABI musl supports. Big endian uses ELFv1 ABI, which musl doesn't support.
2018-10-02qemu: give up and accept a mips64r2 worldJason A. Donenfeld3-6/+8
We can't do SMP this way, and we also fall back to using the default N32 ABI, which is a bummer. But the mips64r6 toolchain is too much of a hassle to build with Gentoo's crossdev, and at least this works.
2018-10-02ratelimiter: prefer IS_ENABLEDJason A. Donenfeld1-3/+2
2018-10-02global: change BUG_ON to WARN_ONJason A. Donenfeld4-27/+19
Suggested-by: Andrew Lunn <andrew@lunn.ch>
2018-10-02poly1305: document rationale for base 2^26->2^64/32 conversionJason A. Donenfeld2-0/+20
2018-10-02crypto: use ZINC_ARCH macrosJason A. Donenfeld2-9/+9
2018-10-02chacha20: no need to align ctxJason A. Donenfeld1-1/+1
We don't use vmovdqa any more. Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2018-10-02chacha20: split chacha20_ctx into unionJason A. Donenfeld5-45/+50
This avoids casts and makes counter increments obvious.
2018-10-02qemu: support m68kJason A. Donenfeld2-1/+18
2018-10-02crypto: add missing static keyword to fpu init functionsJason A. Donenfeld4-4/+3