Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
60a679f5
Commit
60a679f5
authored
Feb 11, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
net_SetPort() sets a port within a socket address
parent
19ed4ded
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
include/vlc_network.h
include/vlc_network.h
+14
-0
No files found.
include/vlc_network.h
View file @
60a679f5
...
@@ -331,6 +331,20 @@ static inline uint16_t net_GetPort (const struct sockaddr *addr)
...
@@ -331,6 +331,20 @@ static inline uint16_t net_GetPort (const struct sockaddr *addr)
return
0
;
return
0
;
}
}
static
inline
void
net_SetPort
(
struct
sockaddr
*
addr
,
uint16_t
port
)
{
switch
(
addr
->
sa_family
)
{
#ifdef AF_INET6
case
AF_INET6
:
((
struct
sockaddr_in6
*
)
addr
)
->
sin6_port
=
port
;
break
;
#endif
case
AF_INET
:
((
struct
sockaddr_in
*
)
addr
)
->
sin_port
=
port
;
break
;
}
}
# ifdef __cplusplus
# ifdef __cplusplus
}
}
# endif
# endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment