Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
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
canghaiwuhen
OpenXG-RAN
Commits
a94c742c
Commit
a94c742c
authored
Jul 01, 2014
by
Lionel Gauthier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
git-svn-id:
http://svn.eurecom.fr/openair4G/trunk@5457
818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent
e401e9f3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
19 deletions
+24
-19
openair1/SIMULATION/ETH_TRANSPORT/pgm_link.c
openair1/SIMULATION/ETH_TRANSPORT/pgm_link.c
+24
-19
No files found.
openair1/SIMULATION/ETH_TRANSPORT/pgm_link.c
View file @
a94c742c
...
@@ -47,7 +47,7 @@ log_handler (
...
@@ -47,7 +47,7 @@ log_handler (
}
}
#endif
#endif
int
pgm_oai_init
(
char
*
if_
name
)
int
pgm_oai_init
(
char
*
if_
addr
)
{
{
pgm_error_t
*
pgm_err
=
NULL
;
pgm_error_t
*
pgm_err
=
NULL
;
...
@@ -68,7 +68,7 @@ int pgm_oai_init(char *if_name)
...
@@ -68,7 +68,7 @@ int pgm_oai_init(char *if_name)
exit
(
EXIT_FAILURE
);
exit
(
EXIT_FAILURE
);
}
}
return
pgm_create_socket
(
oai_emulation
.
info
.
multicast_group
,
if_
name
);
return
pgm_create_socket
(
oai_emulation
.
info
.
multicast_group
,
if_
addr
);
}
}
int
pgm_recv_msg
(
int
group
,
uint8_t
*
buffer
,
uint32_t
length
,
int
pgm_recv_msg
(
int
group
,
uint8_t
*
buffer
,
uint32_t
length
,
...
@@ -89,8 +89,9 @@ int pgm_recv_msg(int group, uint8_t *buffer, uint32_t length,
...
@@ -89,8 +89,9 @@ int pgm_recv_msg(int group, uint8_t *buffer, uint32_t length,
DevCheck
((
group
<=
MULTICAST_LINK_NUM_GROUPS
)
&&
(
group
>=
0
),
DevCheck
((
group
<=
MULTICAST_LINK_NUM_GROUPS
)
&&
(
group
>=
0
),
group
,
MULTICAST_LINK_NUM_GROUPS
,
0
);
group
,
MULTICAST_LINK_NUM_GROUPS
,
0
);
#ifdef DEBUG_EMU
LOG_I
(
EMU
,
"[PGM] Entering recv function for group %d
\n
"
,
group
);
LOG_I
(
EMU
,
"[PGM] Entering recv function for group %d
\n
"
,
group
);
#endif
do
{
do
{
status
=
pgm_recvfrom
(
pgm_multicast_group
[
group
].
sock
,
status
=
pgm_recvfrom
(
pgm_multicast_group
[
group
].
sock
,
buffer
,
buffer
,
...
@@ -102,7 +103,9 @@ int pgm_recv_msg(int group, uint8_t *buffer, uint32_t length,
...
@@ -102,7 +103,9 @@ int pgm_recv_msg(int group, uint8_t *buffer, uint32_t length,
&
pgm_err
);
&
pgm_err
);
if
(
PGM_IO_STATUS_NORMAL
==
status
)
{
if
(
PGM_IO_STATUS_NORMAL
==
status
)
{
#ifdef DEBUG_EMU
LOG_D
(
EMU
,
"[PGM] Received %d bytes for group %d
\n
"
,
num_bytes
,
group
);
LOG_D
(
EMU
,
"[PGM] Received %d bytes for group %d
\n
"
,
num_bytes
,
group
);
#endif
return
num_bytes
;
return
num_bytes
;
}
else
if
(
PGM_IO_STATUS_TIMER_PENDING
==
status
)
{
}
else
if
(
PGM_IO_STATUS_TIMER_PENDING
==
status
)
{
if
(
pgm_would_block
==
0
)
{
if
(
pgm_would_block
==
0
)
{
...
@@ -123,7 +126,9 @@ int pgm_recv_msg(int group, uint8_t *buffer, uint32_t length,
...
@@ -123,7 +126,9 @@ int pgm_recv_msg(int group, uint8_t *buffer, uint32_t length,
}
else
if
(
PGM_IO_STATUS_RESET
==
status
)
{
}
else
if
(
PGM_IO_STATUS_RESET
==
status
)
{
LOG_W
(
EMU
,
"[PGM] Got session reset
\n
"
);
LOG_W
(
EMU
,
"[PGM] Got session reset
\n
"
);
}
else
{
}
else
{
#ifdef DEBUG_EMU
LOG_D
(
EMU
,
"[PGM] Got status %d
\n
"
,
status
);
LOG_D
(
EMU
,
"[PGM] Got status %d
\n
"
,
status
);
#endif
if
(
pgm_err
)
{
if
(
pgm_err
)
{
LOG_E
(
EMU
,
"[PGM] recvform failed: %s"
,
pgm_err
->
message
);
LOG_E
(
EMU
,
"[PGM] recvform failed: %s"
,
pgm_err
->
message
);
pgm_error_free
(
pgm_err
);
pgm_error_free
(
pgm_err
);
...
@@ -158,7 +163,7 @@ int pgm_create_socket(int index, const char *if_addr)
...
@@ -158,7 +163,7 @@ int pgm_create_socket(int index, const char *if_addr)
int
udp_encap_port
=
46014
+
index
;
int
udp_encap_port
=
46014
+
index
;
int
max_tpdu
=
1500
;
int
max_tpdu
=
1500
;
int
sqns
=
100
;
int
sqns
=
100
;
int
port
;
int
port
=
0
;
struct
pgm_sockaddr_t
addr
;
struct
pgm_sockaddr_t
addr
;
int
blocking
=
1
;
int
blocking
=
1
;
int
multicast_loop
=
0
;
int
multicast_loop
=
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