-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e3dd7f2
commit a497d55
Showing
99 changed files
with
15,454 additions
and
1,554 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
Full list of copyright holders: | ||
|
||
Alex Cornejo <acornejo@gmail.com> | ||
Bent Cardan <bent@nothingsatisfies.com> | ||
Constantine Tarasenkov <constantine@protonmail.com> | ||
Jim Jagielski <jimjag@gmail.com> | ||
Jim Schimpf <jim.schimpf@gmail.com> | ||
Luca Barbato <luca.barbato@gmail.com> | ||
Martin Lucina <martin@lucina.net> | ||
Martin Sustrik <sustrik@250bpm.com>* | ||
Maximilian Pudelko <maximilian.pudelko@gmail.com> | ||
Michael Gehring <mg@ebfe.org> | ||
Nick Desaulniers <nick@mozilla.com> | ||
Nir Soffer <nsoffer@redhat.com> | ||
Paul Banks <banks@banksdesigns.co.uk> | ||
Petr Skocik <pskocik@gmail.com> | ||
Sergey Avseyev <sergey.avseyev@gmail.com> | ||
Tai Chi Minh Ralph Eastwood <tcmreastwood@gmail.com>* | ||
Yue Xu <red_angelx@qq.com> | ||
Zach Banks <zbanks@mit.edu> | ||
|
||
* Future patches by this author are submitted under the MIT/X11 license | ||
|
||
Copyrights for DNS resolution library in dns subdirectory are owned by: | ||
William Ahern <william@25thandClement.com> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), | ||
to deal in the Software without restriction, including without limitation | ||
the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
and/or sell copies of the Software, and to permit persons to whom | ||
the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included | ||
in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS | ||
IN THE SOFTWARE. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/* | ||
Copyright (c) 2017 Martin Sustrik | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), | ||
to deal in the Software without restriction, including without limitation | ||
the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
and/or sell copies of the Software, and to permit persons to whom | ||
the Software is furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included | ||
in all copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS | ||
IN THE SOFTWARE. | ||
*/ | ||
|
||
#include <errno.h> | ||
#include <stddef.h> | ||
|
||
#include "libdillimpl.h" | ||
#include "utils.h" | ||
|
||
dill_unique_id(bsock_type); | ||
|
||
int bsend(int s, const void *buf, size_t len, int64_t deadline) { | ||
struct bsock_vfs *b = hquery(s, bsock_type); | ||
if(dill_slow(!b)) return -1; | ||
struct iolist iol = {(void*)buf, len, NULL, 0}; | ||
return b->bsendl(b, &iol, &iol, deadline); | ||
} | ||
|
||
int brecv(int s, void *buf, size_t len, int64_t deadline) { | ||
struct bsock_vfs *b = hquery(s, bsock_type); | ||
if(dill_slow(!b)) return -1; | ||
struct iolist iol = {buf, len, NULL, 0}; | ||
return b->brecvl(b, &iol, &iol, deadline); | ||
} | ||
|
||
int bsendl(int s, struct iolist *first, struct iolist *last, int64_t deadline) { | ||
struct bsock_vfs *b = hquery(s, bsock_type); | ||
if(dill_slow(!b)) return -1; | ||
if(dill_slow(!first || !last || last->iol_next)) { | ||
errno = EINVAL; return -1;} | ||
return b->bsendl(b, first, last, deadline); | ||
} | ||
|
||
int brecvl(int s, struct iolist *first, struct iolist *last, int64_t deadline) { | ||
struct bsock_vfs *b = hquery(s, bsock_type); | ||
if(dill_slow(!b)) return -1; | ||
if(dill_slow((first && !last) || (!first && last) || last->iol_next)) { | ||
errno = EINVAL; return -1;} | ||
return b->brecvl(b, first, last, deadline); | ||
} | ||
|
Oops, something went wrong.