Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libnice
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
cpp-libs
libnice
Commits
4b835a81
Commit
4b835a81
authored
Feb 01, 2013
by
Youness Alaoui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add nice_address_ip_version API to NiceAddress
parent
bb42398d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
0 deletions
+27
-0
agent/address.c
agent/address.c
+14
-0
agent/address.h
agent/address.h
+12
-0
nice/libnice.sym
nice/libnice.sym
+1
-0
No files found.
agent/address.c
View file @
4b835a81
...
@@ -363,3 +363,17 @@ nice_address_is_valid (const NiceAddress *a)
...
@@ -363,3 +363,17 @@ nice_address_is_valid (const NiceAddress *a)
return
FALSE
;
return
FALSE
;
}
}
}
}
NICEAPI_EXPORT
int
nice_address_ip_version
(
const
NiceAddress
*
addr
)
{
switch
(
addr
->
s
.
addr
.
sa_family
)
{
case
AF_INET
:
return
4
;
case
AF_INET6
:
return
6
;
default:
return
0
;
}
}
agent/address.h
View file @
4b835a81
...
@@ -275,6 +275,18 @@ G_GNUC_WARN_UNUSED_RESULT
...
@@ -275,6 +275,18 @@ G_GNUC_WARN_UNUSED_RESULT
gboolean
gboolean
nice_address_is_valid
(
const
NiceAddress
*
addr
);
nice_address_is_valid
(
const
NiceAddress
*
addr
);
/**
* nice_address_ip_version:
* @addr: The #NiceAddress to query
*
* Returns the IP version of the address
*
* Returns: 4 for IPv4, 6 for IPv6 and 0 for undefined address
*/
G_GNUC_WARN_UNUSED_RESULT
int
nice_address_ip_version
(
const
NiceAddress
*
addr
);
G_END_DECLS
G_END_DECLS
#endif
/* _ADDRESS_H */
#endif
/* _ADDRESS_H */
...
...
nice/libnice.sym
View file @
4b835a81
...
@@ -4,6 +4,7 @@ nice_address_equal
...
@@ -4,6 +4,7 @@ nice_address_equal
nice_address_free
nice_address_free
nice_address_get_port
nice_address_get_port
nice_address_init
nice_address_init
nice_address_ip_version
nice_address_is_private
nice_address_is_private
nice_address_is_valid
nice_address_is_valid
nice_address_new
nice_address_new
...
...
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