Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
felixmoebius
libc
Commits
6f7f9e31
Commit
6f7f9e31
authored
5 years ago
by
Salim Nasser
Committed by
Baoshan Pang
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
VxWorks socket and epoll definitions needed by mio and related crates
parent
d7375924
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/vxworks/mod.rs
+74
-0
74 additions, 0 deletions
src/vxworks/mod.rs
with
74 additions
and
0 deletions
src/vxworks/mod.rs
+
74
−
0
View file @
6f7f9e31
...
...
@@ -187,6 +187,22 @@ s! {
pub
iov_len
:
::
size_t
,
}
pub
struct
msghdr
{
pub
msg_name
:
*
mut
c_void
,
pub
msg_namelen
:
socklen_t
,
pub
msg_iov
:
*
mut
iovec
,
pub
msg_iovlen
:
::
c_int
,
pub
msg_control
:
*
mut
c_void
,
pub
msg_controllen
:
socklen_t
,
pub
msg_flags
:
::
c_int
,
}
pub
struct
cmsghdr
{
pub
cmsg_len
:
socklen_t
,
pub
cmsg_level
:
::
c_int
,
pub
cmsg_type
:
::
c_int
,
}
// poll.h
pub
struct
pollfd
{
pub
fd
:
::
c_int
,
...
...
@@ -438,6 +454,13 @@ s! {
pub
pw_shell
:
*
mut
::
c_char
,
}
// epoll.h
pub
struct
epoll_event
{
pub
events
:
u32
,
pub
u64
:
u64
,
}
// rtpLibCommon.h
pub
struct
RTP_DESC
{
pub
status
:
::
c_int
,
...
...
@@ -805,6 +828,21 @@ pub const FIOSQUEEZE: ::c_int = 15;
pub
const
FIONBIO
:
::
c_int
=
16
;
pub
const
_POSIX_PATH_MAX
:
::
c_int
=
256
;
// epoll.h
pub
const
EPOLLIN
:
::
c_int
=
0x1
;
pub
const
EPOLLPRI
:
::
c_int
=
0x2
;
pub
const
EPOLLOUT
:
::
c_int
=
0x4
;
pub
const
EPOLLERR
:
::
c_int
=
0x8
;
pub
const
EPOLLHUP
:
::
c_int
=
0x10
;
pub
const
EPOLLRDHUP
:
::
c_int
=
0x2000
;
pub
const
EPOLLONESHOT
:
::
c_int
=
1
<<
30
;
pub
const
EPOLLET
:
::
c_int
=
1
<<
31
;
pub
const
EPOLL_CTL_ADD
:
::
c_int
=
1
;
pub
const
EPOLL_CTL_DEL
:
::
c_int
=
2
;
pub
const
EPOLL_CTL_MOD
:
::
c_int
=
3
;
// Some poll stuff
pub
const
POLLIN
:
::
c_short
=
0x0001
;
pub
const
POLLPRI
:
::
c_short
=
0x0002
;
...
...
@@ -1743,6 +1781,12 @@ extern "C" {
pFromLen
:
*
mut
::
socklen_t
,
)
->
::
ssize_t
;
pub
fn
recvmsg
(
socket
:
::
c_int
,
mp
:
*
mut
::
msghdr
,
flags
:
::
c_int
,
)
->
::
ssize_t
;
// socket.h
pub
fn
send
(
socket
:
::
c_int
,
...
...
@@ -1751,6 +1795,12 @@ extern "C" {
flags
:
::
c_int
,
)
->
::
ssize_t
;
pub
fn
sendmsg
(
socket
:
::
c_int
,
mp
:
*
const
::
msghdr
,
flags
:
::
c_int
,
)
->
::
ssize_t
;
// socket.h
pub
fn
sendto
(
socket
:
::
c_int
,
...
...
@@ -2054,6 +2104,30 @@ extern "C" {
iovcnt
:
::
c_int
,
)
->
::
ssize_t
;
// epoll.h
pub
fn
epoll_create
(
size
:
::
c_int
)
->
::
c_int
;
pub
fn
epoll_create1
(
flags
:
::
c_int
)
->
::
c_int
;
pub
fn
epoll_ctl
(
epfd
:
::
c_int
,
op
:
::
c_int
,
fd
:
::
c_int
,
event
:
*
mut
::
epoll_event
)
->
::
c_int
;
pub
fn
epoll_create_and_ctl
(
num
:
::
c_int
,
fds
:
*
mut
::
c_int
,
event
:
*
mut
::
epoll_event
)
->
::
c_int
;
pub
fn
epoll_wait
(
epfd
:
::
c_int
,
events
:
*
mut
::
epoll_event
,
maxevents
:
::
c_int
,
timeout
:
::
c_int
)
->
::
c_int
;
// randomNumGen.h
pub
fn
randBytes
(
buf
:
*
mut
c_uchar
,
length
:
c_int
)
->
c_int
;
pub
fn
randABytes
(
buf
:
*
mut
c_uchar
,
length
:
c_int
)
->
c_int
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment