Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
external
sofia-sip
Commits
be6182a7
Commit
be6182a7
authored
Jan 16, 2006
by
Martti Mela
Browse files
OS X specific localinfo stuff
darcs-hash:20060116173244-1b897-be77317eeea50c557beb98ee015a3a2a7a7090f5.gz
parent
7a1929a1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
+32
-0
libsofia-sip-ua/su/su_localinfo.c
libsofia-sip-ua/su/su_localinfo.c
+32
-0
No files found.
libsofia-sip-ua/su/su_localinfo.c
View file @
be6182a7
...
...
@@ -364,6 +364,38 @@ int localinfo4(su_localinfo_t const *hints, su_localinfo_t **rresult)
return
ELI_SYSTEM
;
}
#if defined(__APPLE_CC__)
{
su_sockaddr_t
*
sa
;
int
salen
=
sizeof
(
sa
.
su_sin
);
int
scope
;
li
=
calloc
(
1
,
sizeof
(
su_localinfo_t
));
sa
=
calloc
(
1
,
sizeof
(
su_sockaddr_t
));
error
=
bind
(
s
,
sa
,
salen
);
if
(
error
<
0
)
goto
err
;
su_close
(
s
);
scope
=
li_scope4
(
sa
->
su_sin
.
sin_addr
.
s_addr
);
li
->
li_family
=
sa
->
su_family
;
li
->
li_flags
=
LI_NUMERIC
;
li
->
li_scope
=
scope
;
li
->
li_index
=
0
;
li
->
li_addrlen
=
su_sockaddr_size
(
sa
);
li
->
li_addr
=
sa
;
li
->
li_canonname
=
NULL
;
*
rresult
=
li
;
return
0
;
}
#endif
# if HAVE_IFNUM
/* Get the list of known IP address from the kernel */
if
(
ioctl
(
s
,
SIOCGIFNUM
,
(
char
*
)
&
numifs
)
<
0
)
{
...
...
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