Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OAI-RAN-5G-sheduler_MaxTBS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MAQ5G-PFC
OAI-RAN-5G-sheduler_MaxTBS
Commits
505c809b
Commit
505c809b
authored
10 years ago
by
Lionel Gauthier
Browse files
Options
Downloads
Patches
Plain Diff
git-svn-id:
http://svn.eurecom.fr/openair4G/trunk@5919
818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent
a36af4ee
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
openair-cn/SGI/sgi_egress.c
+13
-12
13 additions, 12 deletions
openair-cn/SGI/sgi_egress.c
with
13 additions
and
12 deletions
openair-cn/SGI/sgi_egress.c
+
13
−
12
View file @
505c809b
...
...
@@ -81,8 +81,6 @@ void sgi_process_raw_packet(sgi_data_t *sgi_data_pP, unsigned char* data_pP, int
u_int32_t
dest4_addr
;
struct
in_addr
in_dest_addr
;
SGI_IF_DEBUG
(
"--------------------------------------------------------------
\n
%s :
\n
"
,
__FUNCTION__
);
sgi_print_hex_octets
(
data_pP
,
packet_sizeP
);
switch
(
htons
(
eh_p
->
ether_type
))
{
...
...
@@ -93,14 +91,16 @@ void sgi_process_raw_packet(sgi_data_t *sgi_data_pP, unsigned char* data_pP, int
dest4_addr
=
iph_p
->
daddr
;
if
(
hashtable_get
(
sgi_data_pP
->
addr_v4_mapping
,
dest4_addr
,
(
void
**
)
&
addr_mapping_p
)
==
HASH_TABLE_OK
)
{
memcpy
(
eh_p
->
ether_dhost
,
addr_mapping_p
->
ue_mac_addr
,
ETH_ALEN
);
SGI_IF_DEBUG
(
"--------------------------------------------------------------
\n
%s :
\n
"
,
__FUNCTION__
);
sgi_print_hex_octets
(
data_pP
,
packet_sizeP
);
}
else
{
if
(
sgi_data_pP
->
ipv4_addr
==
dest4_addr
)
{
SGI_IF_DEBUG
(
"%s Dropping incoming egress IPV4 packet not UE IP flow
\n
"
,
__FUNCTION__
);
//
SGI_IF_DEBUG("%s Dropping incoming egress IPV4 packet not UE IP flow\n", __FUNCTION__);
return
;
}
else
{
in_dest_addr
.
s_addr
=
dest4_addr
;
SGI_IF_WARNING
(
"%s Dropping incoming egress IPV4 packet, IPV4 dest %s not found
\n
"
,
__FUNCTION__
,
inet_ntoa
(
in_dest_addr
));
//
SGI_IF_WARNING("%s Dropping incoming egress IPV4 packet, IPV4 dest %s not found \n", __FUNCTION__, inet_ntoa(in_dest_addr));
return
;
}
}
...
...
@@ -114,8 +114,10 @@ void sgi_process_raw_packet(sgi_data_t *sgi_data_pP, unsigned char* data_pP, int
memcpy
(
dest6_addr
.
__in6_u
.
__u6_addr8
,
ip6h_p
->
daddr
.
__in6_u
.
__u6_addr8
,
16
);
if
(
obj_hashtable_get
(
sgi_data_pP
->
addr_v6_mapping
,
(
void
*
)
&
dest6_addr
,
sizeof
(
struct
in6_addr
),
(
void
**
)
&
addr_mapping_p
)
==
HASH_TABLE_OK
)
{
memcpy
(
eh_p
->
ether_dhost
,
addr_mapping_p
->
ue_mac_addr
,
ETH_ALEN
);
SGI_IF_DEBUG
(
"--------------------------------------------------------------
\n
%s :
\n
"
,
__FUNCTION__
);
sgi_print_hex_octets
(
data_pP
,
packet_sizeP
);
}
else
{
SGI_IF_WARNING
(
"%s Dropping incoming egress IPV6 packet, IPV6 dest %X:%X:%X:%X:%X:%X:%X:%X not found
\n
"
,
__FUNCTION__
,
NIP6ADDR
(
&
dest6_addr
));
//
SGI_IF_WARNING("%s Dropping incoming egress IPV6 packet, IPV6 dest %X:%X:%X:%X:%X:%X:%X:%X not found \n", __FUNCTION__, NIP6ADDR(&dest6_addr));
return
;
}
break
;
...
...
@@ -144,11 +146,11 @@ void sgi_process_raw_packet(sgi_data_t *sgi_data_pP, unsigned char* data_pP, int
memcpy
(
eh_p
->
ether_dhost
,
addr_mapping_p
->
ue_mac_addr
,
ETH_ALEN
);
}
else
{
if
(
sgi_data_pP
->
ipv4_addr
==
dest4_addr
)
{
SGI_IF_DEBUG
(
"%s Dropping incoming egress IPV4 packet not UE IP flow
\n
"
,
__FUNCTION__
);
//
SGI_IF_DEBUG("%s Dropping incoming egress IPV4 packet not UE IP flow\n", __FUNCTION__);
return
;
}
else
{
in_dest_addr
.
s_addr
=
dest4_addr
;
SGI_IF_WARNING
(
"%s Dropping incoming egress IPV4 packet, IPV4 dest %s not found
\n
"
,
__FUNCTION__
,
inet_ntoa
(
in_dest_addr
));
//
SGI_IF_WARNING("%s Dropping incoming egress IPV4 packet, IPV4 dest %s not found \n", __FUNCTION__, inet_ntoa(in_dest_addr));
return
;
}
}
...
...
@@ -220,10 +222,9 @@ void sgi_process_raw_packet(sgi_data_t *sgi_data_pP, unsigned char* data_pP, int
u_int32_t
src4_addr
;
struct
in_addr
in_dest_addr
;
SGI_IF_DEBUG
(
"--------------------------------------------------------------
\n
%s :
\n
"
,
__FUNCTION__
);
sgi_print_hex_octets
(
data_pP
,
packet_sizeP
);
switch
(
htons
(
eh_p
->
ether_type
))
{
sgi_print_hex_octets
(
data_pP
,
packet_sizeP
);
//*******************
case
ETHERTYPE_IP
:
...
...
@@ -232,11 +233,11 @@ void sgi_process_raw_packet(sgi_data_t *sgi_data_pP, unsigned char* data_pP, int
dest4_addr
=
iph_p
->
daddr
;
if
(
hashtable_get
(
sgi_data_pP
->
addr_v4_mapping
,
dest4_addr
,
(
void
**
)
&
addr_mapping_p
)
!=
HASH_TABLE_OK
)
{
if
(
sgi_data_pP
->
ipv4_addr
==
dest4_addr
)
{
SGI_IF_DEBUG
(
"%s Dropping incoming egress IPV4 packet not UE IP flow
\n
"
,
__FUNCTION__
);
//
SGI_IF_DEBUG("%s Dropping incoming egress IPV4 packet not UE IP flow\n", __FUNCTION__);
return
;
}
else
{
in_dest_addr
.
s_addr
=
dest4_addr
;
SGI_IF_WARNING
(
"%s Dropping incoming egress IPV4 packet, IPV4 dest %s not found
\n
"
,
__FUNCTION__
,
inet_ntoa
(
in_dest_addr
));
//
SGI_IF_WARNING("%s Dropping incoming egress IPV4 packet, IPV4 dest %s not found \n", __FUNCTION__, inet_ntoa(in_dest_addr));
return
;
}
}
...
...
@@ -309,7 +310,7 @@ void sgi_process_raw_packet(sgi_data_t *sgi_data_pP, unsigned char* data_pP, int
break
;
default:
SGI_IF_ERROR
(
"%s UNHANDLED ether type %d of incoming egress packet
\n
"
,
__FUNCTION__
,
eh_p
->
ether_type
);
//
SGI_IF_ERROR("%s UNHANDLED ether type %d of incoming egress packet\n", __FUNCTION__, eh_p->ether_type);
return
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment