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
zzha zzha
OpenXG-RAN
Commits
505c809b
Commit
505c809b
authored
Oct 20, 2014
by
Lionel Gauthier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
git-svn-id:
http://svn.eurecom.fr/openair4G/trunk@5919
818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent
a36af4ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
12 deletions
+13
-12
openair-cn/SGI/sgi_egress.c
openair-cn/SGI/sgi_egress.c
+13
-12
No files found.
openair-cn/SGI/sgi_egress.c
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
;
}
...
...
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