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
bbefb854
Commit
bbefb854
authored
Nov 03, 2008
by
Youness Alaoui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove all 'restrict' keywords as they are not supported by MSVC
parent
163f1386
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
34 additions
and
34 deletions
+34
-34
agent/conncheck.c
agent/conncheck.c
+1
-1
agent/discovery.c
agent/discovery.c
+1
-1
stun/stunhmac.c
stun/stunhmac.c
+1
-1
stun/stunmessage.c
stun/stunmessage.c
+10
-10
stun/stunmessage.h
stun/stunmessage.h
+9
-9
stun/usages/ice.c
stun/usages/ice.c
+1
-1
stun/usages/ice.h
stun/usages/ice.h
+2
-2
stun/usages/timer.c
stun/usages/timer.c
+1
-1
stun/usages/trans.c
stun/usages/trans.c
+4
-4
stun/usages/trans.h
stun/usages/trans.h
+2
-2
stun/utils.c
stun/utils.c
+1
-1
stun/utils.h
stun/utils.h
+1
-1
No files found.
agent/conncheck.c
View file @
bbefb854
...
...
@@ -65,7 +65,7 @@ static void priv_prune_pending_checks (Stream *stream, guint component_id);
static
gboolean
priv_schedule_triggered_check
(
NiceAgent
*
agent
,
Stream
*
stream
,
Component
*
component
,
NiceSocket
*
local_socket
,
NiceCandidate
*
remote_cand
,
gboolean
use_candidate
);
static
void
priv_mark_pair_nominated
(
NiceAgent
*
agent
,
Stream
*
stream
,
Component
*
component
,
NiceCandidate
*
remotecand
);
static
int
priv_timer_expired
(
GTimeVal
*
restrict
timer
,
GTimeVal
*
restrict
now
)
static
int
priv_timer_expired
(
GTimeVal
*
timer
,
GTimeVal
*
now
)
{
return
(
now
->
tv_sec
==
timer
->
tv_sec
)
?
now
->
tv_usec
>=
timer
->
tv_usec
:
...
...
agent/discovery.c
View file @
bbefb854
...
...
@@ -59,7 +59,7 @@
#include "stun/usages/turn.h"
#include "socket.h"
static
inline
int
priv_timer_expired
(
GTimeVal
*
restrict
timer
,
GTimeVal
*
restrict
now
)
static
inline
int
priv_timer_expired
(
GTimeVal
*
timer
,
GTimeVal
*
now
)
{
return
(
now
->
tv_sec
==
timer
->
tv_sec
)
?
now
->
tv_usec
>=
timer
->
tv_usec
:
...
...
stun/stunhmac.c
View file @
bbefb854
...
...
@@ -48,7 +48,7 @@
#include <assert.h>
void
stun_sha1
(
const
uint8_t
*
msg
,
size_t
len
,
uint8_t
*
sha
,
const
void
*
restrict
key
,
size_t
keylen
,
int
padding
)
const
void
*
key
,
size_t
keylen
,
int
padding
)
{
HMAC_CTX
ctx
;
uint16_t
fakelen
=
htons
(
len
-
20u
);
...
...
stun/stunmessage.c
View file @
bbefb854
...
...
@@ -89,7 +89,7 @@ uint16_t stun_message_length (const StunMessage *msg)
const
void
*
stun_message_find
(
const
StunMessage
*
msg
,
stun_attr_type_t
type
,
uint16_t
*
restrict
palen
)
uint16_t
*
palen
)
{
size_t
length
=
stun_message_length
(
msg
);
size_t
offset
=
0
;
...
...
@@ -146,7 +146,7 @@ int stun_message_find_flag (const StunMessage *msg, stun_attr_type_t type)
int
stun_message_find32
(
const
StunMessage
*
msg
,
stun_attr_type_t
type
,
uint32_t
*
restrict
pval
)
uint32_t
*
pval
)
{
const
void
*
ptr
;
uint16_t
len
;
...
...
@@ -210,7 +210,7 @@ int stun_message_find_string (const StunMessage *msg, stun_attr_type_t type,
int
stun_message_find_addr
(
const
StunMessage
*
msg
,
stun_attr_type_t
type
,
struct
sockaddr
*
restrict
addr
,
socklen_t
*
restrict
addrlen
)
struct
sockaddr
*
addr
,
socklen_t
*
addrlen
)
{
const
uint8_t
*
ptr
;
uint16_t
len
;
...
...
@@ -270,8 +270,8 @@ stun_message_find_addr (const StunMessage *msg, stun_attr_type_t type,
int
stun_message_find_xor_addr
(
const
StunMessage
*
msg
,
stun_attr_type_t
type
,
struct
sockaddr
*
restrict
addr
,
socklen_t
*
restrict
addrlen
)
struct
sockaddr
*
addr
,
socklen_t
*
addrlen
)
{
int
val
=
stun_message_find_addr
(
msg
,
type
,
addr
,
addrlen
);
if
(
val
)
...
...
@@ -282,7 +282,7 @@ stun_message_find_xor_addr (const StunMessage *msg, stun_attr_type_t type,
int
stun_message_find_xor_addr_full
(
const
StunMessage
*
msg
,
stun_attr_type_t
type
,
struct
sockaddr
*
restrict
addr
,
socklen_t
*
restrict
addrlen
,
struct
sockaddr
*
addr
,
socklen_t
*
addrlen
,
uint32_t
magic_cookie
)
{
int
val
=
stun_message_find_addr
(
msg
,
type
,
addr
,
addrlen
);
...
...
@@ -292,7 +292,7 @@ stun_message_find_xor_addr_full (const StunMessage *msg, stun_attr_type_t type,
return
stun_xor_address
(
msg
,
addr
,
*
addrlen
,
magic_cookie
);
}
int
stun_message_find_error
(
const
StunMessage
*
msg
,
int
*
restrict
code
)
int
stun_message_find_error
(
const
StunMessage
*
msg
,
int
*
code
)
{
uint16_t
alen
;
const
uint8_t
*
ptr
=
stun_message_find
(
msg
,
STUN_ATTRIBUTE_ERROR_CODE
,
&
alen
);
...
...
@@ -405,7 +405,7 @@ stun_message_append_string (StunMessage * msg, stun_attr_type_t type,
int
stun_message_append_addr
(
StunMessage
*
msg
,
stun_attr_type_t
type
,
const
struct
sockaddr
*
restrict
addr
,
socklen_t
addrlen
)
const
struct
sockaddr
*
addr
,
socklen_t
addrlen
)
{
const
void
*
pa
;
uint8_t
*
ptr
;
...
...
@@ -457,7 +457,7 @@ stun_message_append_addr (StunMessage *msg, stun_attr_type_t type,
int
stun_message_append_xor_addr
(
StunMessage
*
msg
,
stun_attr_type_t
type
,
const
struct
sockaddr
*
restrict
addr
,
socklen_t
addrlen
)
const
struct
sockaddr
*
addr
,
socklen_t
addrlen
)
{
int
val
;
/* Must be big enough to hold any supported address: */
...
...
@@ -477,7 +477,7 @@ int stun_message_append_xor_addr (StunMessage *msg, stun_attr_type_t type,
}
int
stun_message_append_xor_addr_full
(
StunMessage
*
msg
,
stun_attr_type_t
type
,
const
struct
sockaddr
*
restrict
addr
,
socklen_t
addrlen
,
const
struct
sockaddr
*
addr
,
socklen_t
addrlen
,
uint32_t
magic_cookie
)
{
int
val
;
...
...
stun/stunmessage.h
View file @
bbefb854
...
...
@@ -257,7 +257,7 @@ uint16_t stun_message_length (const StunMessage *msg);
* otherwise NULL.
*/
const
void
*
stun_message_find
(
const
StunMessage
*
msg
,
stun_attr_type_t
type
,
uint16_t
*
restrict
palen
);
uint16_t
*
palen
);
/**
...
...
@@ -323,7 +323,7 @@ int stun_message_find_string (const StunMessage *msg, stun_attr_type_t type,
* EAFNOSUPPORT if address family is unknown.
*/
int
stun_message_find_addr
(
const
StunMessage
*
msg
,
stun_attr_type_t
type
,
struct
sockaddr
*
restrict
addr
,
socklen_t
*
restrict
addrlen
);
struct
sockaddr
*
addr
,
socklen_t
*
addrlen
);
/**
* Extracts an obfuscated network address attribute from a valid STUN message.
...
...
@@ -338,14 +338,14 @@ int stun_message_find_addr (const StunMessage *msg, stun_attr_type_t type,
* EAFNOSUPPORT if address family is unknown.
*/
int
stun_message_find_xor_addr
(
const
StunMessage
*
msg
,
stun_attr_type_t
type
,
struct
sockaddr
*
restrict
addr
,
socklen_t
*
restrict
addrlen
);
struct
sockaddr
*
addr
,
socklen_t
*
addrlen
);
int
stun_message_find_xor_addr_full
(
const
StunMessage
*
msg
,
stun_attr_type_t
type
,
struct
sockaddr
*
restrict
addr
,
socklen_t
*
restrict
addrlen
,
uint32_t
magic_cookie
);
stun_attr_type_t
type
,
struct
sockaddr
*
addr
,
socklen_t
*
addrlen
,
uint32_t
magic_cookie
);
int
stun_message_find_error
(
const
StunMessage
*
msg
,
int
*
restrict
code
);
int
stun_message_find_error
(
const
StunMessage
*
msg
,
int
*
code
);
void
*
stun_message_append
(
StunMessage
*
msg
,
stun_attr_type_t
type
,
size_t
length
);
...
...
@@ -407,7 +407,7 @@ int stun_message_append_string (StunMessage *msg, stun_attr_type_t type,
* EINVAL if the socket address length is too small w.r.t. the address family.
*/
int
stun_message_append_addr
(
StunMessage
*
msg
,
stun_attr_type_t
type
,
const
struct
sockaddr
*
restrict
addr
,
socklen_t
addrlen
);
const
struct
sockaddr
*
addr
,
socklen_t
addrlen
);
/**
* Appends an attribute consisting of a xor'ed network address.
...
...
@@ -421,10 +421,10 @@ int stun_message_append_addr (StunMessage * msg, stun_attr_type_t type,
* EINVAL if the socket address length is too small w.r.t. the address family.
*/
int
stun_message_append_xor_addr
(
StunMessage
*
msg
,
stun_attr_type_t
type
,
const
struct
sockaddr
*
restrict
addr
,
socklen_t
addrlen
);
const
struct
sockaddr
*
addr
,
socklen_t
addrlen
);
int
stun_message_append_xor_addr_full
(
StunMessage
*
msg
,
stun_attr_type_t
type
,
const
struct
sockaddr
*
restrict
addr
,
socklen_t
addrlen
,
const
struct
sockaddr
*
addr
,
socklen_t
addrlen
,
uint32_t
magic_cookie
);
/**
...
...
stun/usages/ice.c
View file @
bbefb854
...
...
@@ -200,7 +200,7 @@ int
stun_usage_ice_conncheck_create_reply
(
StunAgent
*
agent
,
StunMessage
*
req
,
StunMessage
*
msg
,
uint8_t
*
buf
,
size_t
*
plen
,
const
struct
sockaddr
*
src
,
socklen_t
srclen
,
bool
*
restrict
control
,
uint64_t
tie
,
bool
*
control
,
uint64_t
tie
,
StunUsageIceCompatibility
compatibility
)
{
const
char
*
username
=
NULL
;
...
...
stun/usages/ice.h
View file @
bbefb854
...
...
@@ -103,8 +103,8 @@ StunUsageIceReturn stun_usage_ice_conncheck_process (StunMessage *msg,
int
stun_usage_ice_conncheck_create_reply
(
StunAgent
*
agent
,
StunMessage
*
req
,
StunMessage
*
msg
,
uint8_t
*
buf
,
size_t
*
plen
,
const
struct
sockaddr
*
restrict
src
,
socklen_t
srclen
,
bool
*
restrict
control
,
uint64_t
tie
,
const
struct
sockaddr
*
src
,
socklen_t
srclen
,
bool
*
control
,
uint64_t
tie
,
StunUsageIceCompatibility
compatibility
);
/**
...
...
stun/usages/timer.c
View file @
bbefb854
...
...
@@ -67,7 +67,7 @@
* Clock used throughout the STUN code.
* STUN requires a monotonic 1kHz clock to operate properly.
*/
static
void
stun_gettime
(
struct
timeval
*
restrict
now
)
static
void
stun_gettime
(
struct
timeval
*
now
)
{
#if defined (_POSIX_MONOTONIC_CLOCK) && (_POSIX_MONOTONIC_CLOCK >= 0)
struct
timespec
spec
;
...
...
stun/usages/trans.c
View file @
bbefb854
...
...
@@ -123,8 +123,8 @@ static int stun_socket (int family, int type, int proto)
}
int
stun_trans_create
(
stun_trans_t
*
restrict
tr
,
int
type
,
int
proto
,
const
struct
sockaddr
*
restrict
srv
,
socklen_t
srvlen
)
int
stun_trans_create
(
stun_trans_t
*
tr
,
int
type
,
int
proto
,
const
struct
sockaddr
*
srv
,
socklen_t
srvlen
)
{
int
val
,
fd
;
...
...
@@ -231,8 +231,8 @@ ssize_t stun_trans_sendto (stun_trans_t *tr, const uint8_t *buf, size_t len,
ssize_t
stun_trans_recvfrom
(
stun_trans_t
*
tr
,
uint8_t
*
buf
,
size_t
maxlen
,
struct
sockaddr
*
restrict
dst
,
socklen_t
*
restrict
dstlen
)
struct
sockaddr
*
dst
,
socklen_t
*
dstlen
)
{
static
const
int
flags
=
MSG_DONTWAIT
|
MSG_NOSIGNAL
;
ssize_t
val
;
...
...
stun/usages/trans.h
View file @
bbefb854
...
...
@@ -122,8 +122,8 @@ ssize_t stun_trans_sendto (stun_trans_t *tr, const uint8_t *buf, size_t len,
const
struct
sockaddr
*
dst
,
socklen_t
dstlen
);
ssize_t
stun_trans_recvfrom
(
stun_trans_t
*
tr
,
uint8_t
*
buf
,
size_t
maxlen
,
struct
sockaddr
*
restrict
src
,
socklen_t
*
restrict
srclen
);
struct
sockaddr
*
src
,
socklen_t
*
srclen
);
ssize_t
stun_trans_send
(
stun_trans_t
*
tr
,
const
uint8_t
*
buf
,
size_t
len
);
...
...
stun/utils.c
View file @
bbefb854
...
...
@@ -168,7 +168,7 @@ void stun_debug_bytes (const void *data, size_t len)
}
int
stun_xor_address
(
const
StunMessage
*
msg
,
struct
sockaddr
*
restrict
addr
,
socklen_t
addrlen
,
struct
sockaddr
*
addr
,
socklen_t
addrlen
,
uint32_t
magic_cookie
)
{
switch
(
addr
->
sa_family
)
...
...
stun/utils.h
View file @
bbefb854
...
...
@@ -72,7 +72,7 @@ void stun_debug (const char *fmt, ...);
void
stun_debug_bytes
(
const
void
*
data
,
size_t
len
);
int
stun_xor_address
(
const
StunMessage
*
msg
,
struct
sockaddr
*
restrict
addr
,
socklen_t
addrlen
,
struct
sockaddr
*
addr
,
socklen_t
addrlen
,
uint32_t
magic_cookie
);
int
stun_memcmp
(
const
StunMessage
*
msg
,
stun_attr_type_t
type
,
...
...
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