Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
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
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
Main
Synchronet
Commits
8620f4d9
Commit
8620f4d9
authored
19 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Include supported socket type (either SOCK_STREAM or SOCK_DGRAM for TCP or UDP)
or 0, for either, in socket_options array.
parent
a5e69819
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/xpdev/sockwrap.c
+31
-29
31 additions, 29 deletions
src/xpdev/sockwrap.c
src/xpdev/sockwrap.h
+1
-0
1 addition, 0 deletions
src/xpdev/sockwrap.h
with
32 additions
and
29 deletions
src/xpdev/sockwrap.c
+
31
−
29
View file @
8620f4d9
...
...
@@ -8,7 +8,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* *
* Copyright 200
4
Rob Swindell - http://www.synchro.net/copyright.html *
* Copyright 200
5
Rob Swindell - http://www.synchro.net/copyright.html *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public License *
...
...
@@ -47,62 +47,64 @@
#include
"filewrap.h"
/* filelength */
static
socket_option_t
socket_options
[]
=
{
{
"TYPE"
,
SOL_SOCKET
,
SO_TYPE
},
{
"DEBUG"
,
SOL_SOCKET
,
SO_DEBUG
},
{
"LINGER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M
,
SOL_SOCKET
,
SO_BROADCAST
},
{
"OOBINLINE"
,
SOCK_STREAM
,
SOL_SOCKET
,
SO_OOBINLINE
},
#ifdef SO_ACCEPTCONN
{
"ACCEPTCONN"
,
SOL_SOCKET
,
SO_ACCEPTCONN
},
{
"ACCEPTCONN"
,
SOCK_STREAM
,
SOL_SOCKET
,
SO_ACCEPTCONN
},
#endif
/* IPPROTO-level socket options */
{
"TCP_NODELAY"
,
IPPROTO_TCP
,
TCP_NODELAY
},
{
"TCP_NODELAY"
,
SOCK_STREAM
,
IPPROTO_TCP
,
TCP_NODELAY
},
/* The following are platform-specific */
#ifdef TCP_MAXSEG
{
"TCP_MAXSEG"
,
IPPROTO_TCP
,
TCP_MAXSEG
},
{
"TCP_MAXSEG"
,
SOCK_STREAM
,
IPPROTO_TCP
,
TCP_MAXSEG
},
#endif
#ifdef TCP_CORK
{
"TCP_CORK"
,
IPPROTO_TCP
,
TCP_CORK
},
{
"TCP_CORK"
,
SOCK_STREAM
,
IPPROTO_TCP
,
TCP_CORK
},
#endif
#ifdef TCP_KEEPIDLE
{
"TCP_KEEPIDLE"
,
IPPROTO_TCP
,
TCP_KEEPIDLE
},
{
"TCP_KEEPIDLE"
,
SOCK_STREAM
,
IPPROTO_TCP
,
TCP_KEEPIDLE
},
#endif
#ifdef TCP_KEEPINTVL
{
"TCP_KEEPINTVL"
,
IPPROTO_TCP
,
TCP_KEEPINTVL
},
{
"TCP_KEEPINTVL"
,
SOCK_STREAM
,
IPPROTO_TCP
,
TCP_KEEPINTVL
},
#endif
#ifdef TCP_KEEPCNT
{
"TCP_KEEPCNT"
,
IPPROTO_TCP
,
TCP_KEEPCNT
},
{
"TCP_KEEPCNT"
,
SOCK_STREAM
,
IPPROTO_TCP
,
TCP_KEEPCNT
},
#endif
#ifdef TCP_SYNCNT
{
"TCP_SYNCNT"
,
IPPROTO_TCP
,
TCP_SYNCNT
},
{
"TCP_SYNCNT"
,
SOCK_STREAM
,
IPPROTO_TCP
,
TCP_SYNCNT
},
#endif
#ifdef TCP_LINGER2
{
"TCP_LINGER2"
,
IPPROTO_TCP
,
TCP_LINGER2
},
{
"TCP_LINGER2"
,
SOCK_STREAM
,
IPPROTO_TCP
,
TCP_LINGER2
},
#endif
#ifdef TCP_DEFER_ACCEPT
{
"TCP_DEFER_ACCEPT"
,
IPPROTO_TCP
,
TCP_DEFER_ACCEPT
},
{
"TCP_DEFER_ACCEPT"
,
SOCK_STREAM
,
IPPROTO_TCP
,
TCP_DEFER_ACCEPT
},
#endif
#ifdef TCP_WINDOW_CLAMP
{
"TCP_WINDOW_CLAMP"
,
IPPROTO_TCP
,
TCP_WINDOW_CLAMP
},
{
"TCP_WINDOW_CLAMP"
,
SOCK_STREAM
,
IPPROTO_TCP
,
TCP_WINDOW_CLAMP
},
#endif
#ifdef TCP_QUICKACK
{
"TCP_QUICKACK"
,
IPPROTO_TCP
,
TCP_QUICKACK
},
{
"TCP_QUICKACK"
,
SOCK_STREAM
,
IPPROTO_TCP
,
TCP_QUICKACK
},
#endif
#ifdef TCP_NOPUSH
{
"TCP_NOPUSH"
,
IPPROTO_TCP
,
TCP_NOPUSH
},
{
"TCP_NOPUSH"
,
SOCK_STREAM
,
IPPROTO_TCP
,
TCP_NOPUSH
},
#endif
#ifdef TCP_NOOPT
{
"TCP_NOOPT"
,
IPPROTO_TCP
,
TCP_NOOPT
},
{
"TCP_NOOPT"
,
SOCK_STREAM
,
IPPROTO_TCP
,
TCP_NOOPT
},
#endif
{
NULL
}
};
...
...
This diff is collapsed.
Click to expand it.
src/xpdev/sockwrap.h
+
1
−
0
View file @
8620f4d9
...
...
@@ -79,6 +79,7 @@
typedef
struct
{
char
*
name
;
int
type
;
/* Supported socket types (or 0 for unspecified) */
int
level
;
int
value
;
}
socket_option_t
;
...
...
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