summaryrefslogtreecommitdiff
path: root/src/packet_io/sendpacket.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/packet_io/sendpacket.c')
-rw-r--r--src/packet_io/sendpacket.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/packet_io/sendpacket.c b/src/packet_io/sendpacket.c
index 9df73e5..aedfb6c 100644
--- a/src/packet_io/sendpacket.c
+++ b/src/packet_io/sendpacket.c
@@ -3278,6 +3278,40 @@ int MESA_dir_human_to_link(int human_dir)
return link_route_dir;
}
+/*
+ args:
+ ��·���䷽��: 0��1, ͨ������stream->routedir;
+
+ ����ֵ:
+ 'E' or 'e': ��ʾ���������Ǵ�Internal to External.
+ 'I' or 'i': ��ʾ���������Ǵ�External to Internal.
+ 'x': ��������;
+*/
+int MESA_dir_link_to_human(int link_route_dir)
+{
+ int human_dir;
+
+ if((link_route_dir != 0) && (link_route_dir != 1)){
+ return 'x';
+ }
+
+ if(0 == sapp_global_val->config.packet_io.inbound_route_dir){
+ if(0 == link_route_dir){
+ human_dir = 'I';
+ }else{
+ human_dir = 'E';
+ }
+ }else{
+ if(0 == link_route_dir){
+ human_dir = 'E';
+ }else{
+ human_dir = 'I';
+ }
+ }
+
+ return human_dir;
+}
+
static inline int dir_check(unsigned char raw_dir)