Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
relibc
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
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
redox-os
relibc
Commits
a7b2294b
Commit
a7b2294b
authored
1 year ago
by
Jeremy Soller
Browse files
Options
Downloads
Patches
Plain Diff
Add more networking constants
parent
5b78afe5
No related branches found
No related tags found
No related merge requests found
Pipeline
#14197
passed
1 year ago
Stage: build
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/header/netinet_in/mod.rs
+12
-5
12 additions, 5 deletions
src/header/netinet_in/mod.rs
src/header/sys_socket/constants.rs
+3
-0
3 additions, 0 deletions
src/header/sys_socket/constants.rs
with
15 additions
and
5 deletions
src/header/netinet_in/mod.rs
+
12
−
5
View file @
a7b2294b
...
...
@@ -44,12 +44,19 @@ pub struct ipv6_mreq {
pub
const
INET_ADDRSTRLEN
:
c_int
=
16
;
pub
const
INET6_ADDRSTRLEN
:
c_int
=
46
;
// IP options
pub
const
IP_TOS
:
c_int
=
1
;
pub
const
IP_RECVTOS
:
c_int
=
13
;
// Protocol Numbers
pub
const
IPPROTO_IP
:
u8
=
0x00
;
pub
const
IPPROTO_ICMP
:
u8
=
0x01
;
pub
const
IPPROTO_TCP
:
u8
=
0x06
;
pub
const
IPPROTO_UDP
:
u8
=
0x11
;
pub
const
IPPROTO_IPV6
:
u8
=
0x29
;
pub
const
IPPROTO_IP
:
u8
=
0
;
pub
const
IPPROTO_ICMP
:
u8
=
1
;
pub
const
IPPROTO_IGMP
:
u8
=
2
;
pub
const
IPPROTO_TCP
:
u8
=
6
;
pub
const
IPPROTO_PUP
:
u8
=
12
;
pub
const
IPPROTO_UDP
:
u8
=
17
;
pub
const
IPPROTO_IDP
:
u8
=
22
;
pub
const
IPPROTO_IPV6
:
u8
=
41
;
pub
const
IPPROTO_RAW
:
u8
=
0xff
;
pub
const
IPPROTO_MAX
:
u8
=
0xff
;
...
...
This diff is collapsed.
Click to expand it.
src/header/sys_socket/constants.rs
+
3
−
0
View file @
a7b2294b
...
...
@@ -2,6 +2,7 @@ use crate::platform::types::*;
pub
const
SOCK_STREAM
:
c_int
=
1
;
pub
const
SOCK_DGRAM
:
c_int
=
2
;
pub
const
SOCK_RAW
:
c_int
=
3
;
pub
const
SOCK_NONBLOCK
:
c_int
=
0o4_000
;
pub
const
SOCK_CLOEXEC
:
c_int
=
0o2_000_000
;
...
...
@@ -52,11 +53,13 @@ pub const MSG_WAITALL: c_int = 256;
pub
const
AF_INET
:
c_int
=
2
;
pub
const
AF_INET6
:
c_int
=
10
;
pub
const
AF_LOCAL
:
c_int
=
AF_UNIX
;
pub
const
AF_UNIX
:
c_int
=
1
;
pub
const
AF_UNSPEC
:
c_int
=
0
;
pub
const
PF_INET
:
c_int
=
2
;
pub
const
PF_INET6
:
c_int
=
10
;
pub
const
PF_LOCAL
:
c_int
=
PF_UNIX
;
pub
const
PF_UNIX
:
c_int
=
1
;
pub
const
PF_UNSPEC
:
c_int
=
0
;
...
...
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