From d6ddbce3755cf7989fd63f946a62f7e4e2d2c54e Mon Sep 17 00:00:00 2001 From: SeekDaSky Date: Fri, 14 Apr 2017 01:43:16 +0200 Subject: [PATCH] Fix port transmission --- central-manager/boot | Bin 22856 -> 0 bytes central-manager/lib/local/handler.o | Bin 6248 -> 0 bytes central-manager/lib/local/middleware.c | 2 +- central-manager/lib/local/middleware.o | Bin 5040 -> 0 bytes central-manager/lib/network/tcp/server.o | Bin 2184 -> 0 bytes central-manager/lib/network/udp/server.o | Bin 2176 -> 0 bytes .../src/commandterminal/CommandTerminal.java | 15 ++++++--------- 7 files changed, 7 insertions(+), 10 deletions(-) delete mode 100755 central-manager/boot delete mode 100644 central-manager/lib/local/handler.o delete mode 100644 central-manager/lib/local/middleware.o delete mode 100644 central-manager/lib/network/tcp/server.o delete mode 100644 central-manager/lib/network/udp/server.o diff --git a/central-manager/boot b/central-manager/boot deleted file mode 100755 index 6733fa5b3678a2d4d278b0887404c509ba5579a0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 22856 zcmeHPe|%KcmA^^&5fPI>5#z7&{DFW<42TF=bq4bAp&$_wq$*5?nF)y|GqdwUgP0Z@ z;$}KcH*KY5)z5yi){n*QwjVyNLdq%$U`gzD+i0m$#cs5yGeT>u)<%oYe$V~!=Do>0 z#ohhvXaC^klXvdv%!YA?cW+s(oaJ z{%d6WY6@N8h<6cTReYbNs@m!|Vty*`tPlb_D_p#w=zRiaiYmQZphte5>{ccPSIPRE z;!-UAS5!8aUD4FIVg9@;n*6hy8iVnc*)0p^&z?W8A{wfg%iB%%N%n@DYk5s7jv6@f zc?$k1D>RBYiKoZVoe#hg|YRW8O&2)9i)6 zsJS7^>LY;w4sL7?1?52xyJ7jV#Y;SME9O>QWtQj6Lr7U6W}iaKpWup2lx8V~2|41_ zahjXx59bB^Yxs|!(|8)qXqOO(tpL)EplY6d@LS)-^gM>m#c{%fe4!~ne0?2Iajq%h zC9xZ^;50X=t=v_|i{r7ERdQal;B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Sm=NOE5}L`SehZzFN=Geyni7;W*Z*$dsRZ6!`E|h^Zrb5S$$>a zSdPBAZs?L4WZbeTJw@NgF>C$ieY0CADL<77rKk9hP#{dTUvt;-LuFEbOHTb7Kbqaq zLL`Y)W+7fu`Z>dg%aVXHOEf3NxPGOZ6ShT;V>%Bl#J}=i%|A50lV#Y5)KL diff --git a/central-manager/lib/local/handler.o b/central-manager/lib/local/handler.o deleted file mode 100644 index 362b022fad325d2f865f3d16babbc2bea3a25c10..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6248 zcmeHLO>7*+67G#d*cc~SObFoxp@|@11710R0tq~{erA%kShh$p|Qp6+#dJYy`l zaG)Yj_k3Md{dIL$^=ux}JGU;0M3|BYyN%7hDU`9Mi)Z@@(M_-wtbz4#=i58^!_(y@ zjB)49|Nd`ghPzeKIQr+K`s57As6LG*=UTX{f6iUz_Du8SNBqP$bv!c0-L;cA$~T`Z zMO}T`(I?NMc}z4Ijclyo%mv^)SpEg8`htO~m-% zAR>Hl=vmRcJO)jN^G=5|_Bz_X!GNwaDvTX{yfQG(9_ny=#)GCg6a>n7qzmM@>e26) zGB))tJY4Yj^QHakJ%_LV116kDe(EqPR*{!eJqpiNuU5yQ>2sJqKz;=xu;T^$EH!9GAo0#9Hq1C~N^wj&Wy5DL-xuylfunKT;W(m?<5s!OYPoYA>i%F2>X}4UXy^vO6^OXB*~ntI*ye@9Yha*xK@);8u@)^^blYAb+Y=(nhgX-NO%w`I$ zbcZmTDYV8N!fd8cqdSDz?8IgZpz9SrShOgEwEne``nL{iQmy_$!J4=4Q%8OU+FtOY zZqKAwu%Qx+je;!}xrHjSx)yeO*TM_H60QZ&IQm&qx%FeRY@Zc;w;$t!J;QwPWz6T$ zf_=u-&&(rS892kr`C2KMuK)q}%9popa$<2!Exj4zRAMO$&~kN;oFFCc4;i|1kwXDD z+}S^H!`bT~)L;mS|97Y%HU65RhGT!wP8Rkg^Vxx>4XI|0N>6TIF5jQi?7fz0q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dans la reponse */ }else{ strcpy(request.addr, SERV_HOST); - request.port = htons(comInfo.sin_port); + request.port = comInfo.sin_port; if( DEBUGMOD&SCK ) printf("{%s}{udp_com} socket opened on %s:%d\n", arg->entity, request.addr, request.port); } diff --git a/central-manager/lib/local/middleware.o b/central-manager/lib/local/middleware.o deleted file mode 100644 index d29b1501a548b41d319a317b9881869cd27bc563..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5040 zcmb_fU2GIp6u#R>4Vo#RATXL@jk(Q%l_wYU%Sb0PW7#?ass($Z?KshH(&&nlF2bKL_jhqQo0win#imrZLn zL>l2wbrvVaqxDTBG0r^i=;ZslfZ!RN|4QN3L4B<{#3$qR=c8v01U=vI?z&%=6)M$0`DlPnA z1twY;dlp(4OXyI8by%4pCe`$nD;lg7tCTHDgRb-r*wj*1(*7)s+f;7`Y}H&Jy9TQn zwBtr51A1ep=OVj5f1D=wBT;WMqxbZIJ8B+Eq_n-v-)2SAbrXiTh0RLVFl~k(b_uKZ z+n&xEmX+*HQAMYUId(d0WOS1%T26_lk~Cv4N6TtE3zq)-9>hzbiJi`mH)fhNXX0Ms zuo=xx8X26VG{rLF`>3t7?&|Q1U&YR(@jhz8rRX^~0AQjRx&73%d05$b4(0T0Puxhm z3FPcXmS(7~fK!$b(BIzL+N`YHzO#FkvOcml(xj|uY}(McwsAck0beC3frDKn&>s#g znK!5Y1iT3qz?R|y$Vn&{(y}0YtgdzbY&9PY9!`;X`d`cfGvYd`jnft zTTug#)WFx(z_-@GV>R#>YT#XfNJ+PU?D!9?(o0iIa3L zWhdjBWp}2u47CVU{{Dn%q)FCHX6yvX*hZg4k{N3Ez)&M;nvQ1&Nbf;v8Uz|xw~Y$N zOVms!Gg^wYb?xfx>2B-n*&XY8Io3tuDZ`> zJ#0qEE{@~5WS&nY9KW^&&r(zb!5h}Ez}InH@Si~?kgbxw%>SlGpM9Nx{;?YRws|&yA6J;^S(McZy$u1yzlWVaIgQ>uz;NRYmeV`$SLO( zrsNd&|D(sD*gxu^Y=R3_8gU}YTU-(2Ba5ID_vc_yjAgwKypH&ySN9ceU$uX3zegs8 zv6mLV3;gnT6Ppo4oD1`Zw!&WI5BKBs4GJN<_;~xync@3L=x}$ U7s8sKeLX%LKs5I@{p+>=8|1MQ5C8xG diff --git a/central-manager/lib/network/tcp/server.o b/central-manager/lib/network/tcp/server.o deleted file mode 100644 index 303904df57525ff2d84fba5033947f3f2fc0b9b7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2184 zcmbu9&rcIU6vy9o1>|=%8ci^<2ci&l(+UAXj49U2#uy+4O!Pvw?GgxWm+Y>Fk`NC> znLP*Ys+7S7oEGWg7kI^zO)7l(_e4{UnZlO0Vi`FvBUPt@_U&fl7L(^Ys>&&w4&Rkg+*SxlS22C<9k}>AlsJJt#N%yZk)QWE(AY z6%A_?{ox(;H5*N(hGRXWW7EB{0j*C<#4g7ZgYmxj08^acLS;Dv%2HJ6YHK?B46Aqs zIW@9ws_IBb^id?$-l(2cP~!8jj-*H6_kP%#8v3OHRQ!dRikX5&Z?8z4iY82jM&TYB zRcJai7ZVkvKN*KqkK@vF`tOdc8=Jfrm&1iRoXQ)fzfy-^tHbp=e5?+iti!=E?fa&! z<-o}2ZLNPW(GS-%;}bJesfn4%bmn$C1CEtjFkMu-OU z$j+DYP?&dIvxNJR^|Arz?9n&cql1Q4mUyeg>CBLkz73nuKPQMrIpnYZ!lz8%j=s>p zlsM`CuxNW4SRZ%Lf=f4Tmn#5>U!`L`u5KhG}b!RP!Y>FN86Jk4}4(CB@SVG}%t zJ{fUpHPf7O(KWK5Ij+sdIpNu6!O&cD$ptNMxCUrh#{n&86^mvGS;=xu4G;V!$2D>b zp!srhZf4dtie@eUe>yRYr&kJ|xFj+%ac(z{lUNoAL)Ehj$k~o fVC@mX5{GwbA{kFtBXows;(Pe>->E5?6O8`{qY)X= diff --git a/central-manager/lib/network/udp/server.o b/central-manager/lib/network/udp/server.o deleted file mode 100644 index 1eb002fa0a1854ba1316a04745ac441f72a130dd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2176 zcmbu9&ubG=5XUD;+r<8iQc z7;TeWYJTjtsQXTj<_B6g!_-&cg|*aPCFzeVxW7`D4+5yc(bhT|WnDcOuZD@6pEu9r zSfgCcx~;(o7aSb}PPko?S7fW^_&Hhv`8xQaBJcIQx0r*Sk(D;PmV)+vKeMYVyI?#*`M%On90~#DKP=R`dN^JUQF{0`S8=S-uFMDD zrq|Ii;6!h&l4j>4OioOUMy^jjP;W$rr6Fk`G8i2gi4H}FX&s=~8Nj!k1m9xV*Vh>g zy}@E#Mox`vk%~9o9e(Mb=xPh-K9tzpt0QR({66+t3wWLwfB^oyEP#=`EC6j@7^4K6 zaN$rgMLUk?gnaCGM0N=q{cUdRN8rV8HsOO!`0XZqtO<`d;dh&G(6#b2tt@3Bo}5mk z)OaE_BPSoqNzhB#dCkCegJz{C24ojXx(1nLtz3dxqg2%GegQIb#T?8PH6xYI<;u7b z+K4mYO#nE9?TD@*+AD!mO*!8Xc!$8>3A|I_I|A<#_*a2<3!EP?%BM%*{d54)h|~YY z^N|ED#!&?>=ARe1n12Lgl2LqW4U_bxf|1UEq#I>toaM8!wvd(#ZP5TJmp0NMWpo{+ zY^hMtipYv3LzD1=-qMY9b{-^KuFa2njzBG0F{{^oAM+yJ{ diff --git a/command-terminal/CommandTerminal/src/commandterminal/CommandTerminal.java b/command-terminal/CommandTerminal/src/commandterminal/CommandTerminal.java index 3aa8fcc..013377a 100644 --- a/command-terminal/CommandTerminal/src/commandterminal/CommandTerminal.java +++ b/command-terminal/CommandTerminal/src/commandterminal/CommandTerminal.java @@ -34,7 +34,7 @@ public class CommandTerminal { try { DatagramSocket socket = new DatagramSocket(); - ByteBuffer buf = ByteBuffer.allocate(19); + ByteBuffer buf = ByteBuffer.allocate(21); buf.clear(); buf.put((byte)(0x01|0x02)); @@ -47,24 +47,21 @@ public class CommandTerminal { if(buf.get() == 3){ System.out.println("--Connection request successful"); - byte address[] = new byte[9]; - buf = buf.get(address,0,9); + byte address[] = new byte[15]; + buf = buf.get(address,0,15); String addressString = new String(address); InetAddress sgcaAddress = InetAddress.getByName(addressString); - buf = buf.get(address,0,7); - short shortVal = buf.getShort(); - int port = shortVal >= 0 ? shortVal : 0x10000 + shortVal; + //emulate an unsigned short + char cast = buf.getChar(); + int port = (int) cast; System.out.println("----Address : "+sgcaAddress.getHostAddress()); System.out.println("----Port : "+port); } - } catch ( IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } - - }