Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Unsubscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin-developers AT sourceware DOT cygnus DOT com From: Chris Faylor Date: Wed, 11 Aug 1999 19:49:42 -0400 To: Sergey Okhapkin Cc: cygwin-developers AT sourceware DOT cygnus DOT com Subject: Re: AF_UNIX implementation for cygwin Message-ID: <19990811194942.A2871@cygnus.com> References: <002801beddbb$188f4d20$02af6080 AT sokhapki-2 DOT cc DOT bellcore DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.6i In-Reply-To: <002801beddbb$188f4d20$02af6080@sokhapki-2.cc.bellcore.com>; from Sergey Okhapkin on Tue, Aug 03, 1999 at 10:18:44AM -0400 I've applied this patch. It should show up in the next snapshot. -chris On Tue, Aug 03, 1999 at 10:18:44AM -0400, Sergey Okhapkin wrote: >fhandler.cc (fhandler_disk_file::fstat) check if the file is unix >domain socket. > (fhandler_disk_file::open) call set_socket_p(). > >fhandler.h (FH_LOCAL, FH_FIFO) new fhandler type flags. > (fhandler_base) get/set_socket_p - new member >functions. > (fhandler_socket::addr_family) new member, not used >now. > (fhandler_socket::get/set_addr_family) new functions >to access addr_family. > >include/sys/un.h new file. > >net.cc include > (cygwin_socket) alway create socket of AF_INET >family, store argument's family. > (get_inet_addr) new static function, does nothing >for AF_INET, converts AF_UNIX requests > into corresponding AF_INET requests. > (cygwin_sendto) use get_inet_addr(). > (cygwin_connect) likewise. > (cygwin_accept) check for sockaddr length. > (cygwin_bind) if bind address is of AF_UNIX family, >bind to any available port > of loopback interface, store port number in the >"socket file", set file attribute to S_IFSOCK. > >path.cc (symlink_check_one) if the file begins with >SOCKET_COOKIE, mark the file as PATH_SOCKET. > >path.h (PATH_SOCKET) new enum value. > (path_conv::issocket) new member function. > (SOCKET_COOKIE) new define. > >syscalls.cc (chmod) mark socket files with system file attribute. > > > > >Sergey Okhapkin, http://www.lexa.ru/sos >Piscataway, NJ > > >begin 666 AF_UNIX.diff >M9&EF9B M=7!R3B O=VENMM.C$X(#$Y.3D**RLK('=I;G-U<"]F:&%N9&QEM.C Q.C(V(#$Y.3D*0$ @+3DR-2PV("LY,C4L."! 0"!F:&%N9&QEM7V9I;&4Z.F9S=&%T("AS=')U8W0@M9&4@)CT@?E-?249-5#L*(" @(" @(&EF("AG971?M"6)U9BT^M7W-O8VME=%]P("@I*0HK"6)U9BT^M(" @(&5LM5%))0E5415]$25)%0U1/4EDI"B )8G5F+3YS=%]M;V1E('P](%-?249$25([ >M"B @(" @("!E;'-E"D! ("TY-#$L-B K.30S+#@@0$ @9FAA;F1L97)?9&ES >M:U]F:6QE.CIFM7W-Y;6QI;FM?<" H*2D*( EB=68M/G-T7VUO9&4@?#T AT 4U])1DQ.2SL**R @ >M(" @(&5LM?#T AT 4U])1E-/0TL["B @(" @("!E;'-E"B )M92 H9V5T7VAA;F1L92 H*2DI"B )("!["D! ("TQ,3DU+#8@*S$Q.3DL-R! >M0"!F:&%N9&QEM(" @M('-E=%]E>&5C86)L95]P("AR96%L7W!A=&@N:7-E>&5C("@I*3L**R @M7W-O8VME=%]P("AR96%L7W!A=&@N:7-S;V-K970@*"DI.PH@"B!O=70Z"B @ >M('-YM96X@*"5S+" E<"DB+"!R97,L"F1I9F8@+75PMM5&AU($IU;" Q-2 P-CHT.3HQ." Q.3DY"BLK*R!W:6YS=7 O9FAA;F1L97(N >M: E4:'4 AT 2G5L(#(Y(# S.C(P.C$V(#$Y.3D*0$ @+38R+#8@*S8R+#@@0$ @ >M96YU;0H@"0D)"2 @('=I;F1O=W-?<&%T:%]N86UE7R!O;B!D97-TM;BX@*B\*(" @1DA?3D]%24Y44B ](#!X,#$P,# P,# L"2\J(%-E="!I9B!) >M+T\@M(" ](#!X,#(P,# P,# L"2\J(%-E="!I9B!N965D('1O(&9I>'5P(&%F=&5R >M(&9O# T,# P,# P+ DO*B!&:6QE >M(&ES('5N:7@@9&]M86EN('-O8VME=" J+PHK("!&2%]&249/(" @(#T@,'@P >M.# P,# P,"P)+RH AT 1FEL92!IM>#0P,# P,# P+ DO*B!4M( H@(" O*B!$979I8V4 AT 9FQA9W,@*B\*0$ @+3$Y-2PV("LQ.3M<'5B;&EC DOT AT H@("!V;VED('-E=%]S>6UL:6YK7W @*&EN="!V86PI('L AT 1DA# >M3TY$4T541B H=F%L+"!364U,24Y+*3L@?0H@("!V;VED('-E=%]S>6UL:6YK >M7W @*"D@>R!&2%-%5$8@*%-934Q)3DLI.R!]"B **R @:6YT(&=E=%]S;V-K >M971?<" H*2![(')E='5R;B!&2$E34T541B H3$]#04PI.R!]"BL@('9O:60@ >MM04PI.R!]"BL@('9O:60@M3"D[('T**PH@("!I;G0 AT 9V5T7V5X96-A8FQE7W @*"D@>R!R971UM4U-%5$8@*$5814-!0DPI.R!]"B @('9O:60@M="!V86PI('L AT 1DA#3TY$4T541B H=F%L+"!%6$5#04),*3L@?0H@("!V;VED >M('-E=%]E>&5C86)L95]P("@I('L AT 1DA3151&("A%6$5#04),*3L@?0I 0" M >M,CDP+#8@*S(Y-BPX($! ('!U8FQI8SH*( H AT 8VQAM:V5T.B!P=6)L:6,@9FAA;F1L97)?8F%S90H@>PHK<')I=F%T93H**R @:6YT >M(&%D9')?9F%M:6QY.PH@<'5B;&EC DOT AT H@("!F:&%N9&QEM;G-T(&-H87(@*FYA;64@/2 P*3L*(" @9FAA;F1L97)?M9VYE9"!I;G0L(&-O;G-T(&-H87(@*FYA;64@/2 P*3L*0$ @+3,P-BPV("LS >M,30L."! 0"!P=6)L:6,Z"B @('-E;&5C=%]R96-OM92 HM=%]E>&-E<'0@*'-E;&5C=%]R96-OM7W)E860@*&EN="!F9"P AT 1%=/4D0@:&]W;&]N9RP@:6YT(&EG;G)A*3L**R @ >M:6YT(&=E=%]A9&1R7V9A;6EL>2 H*2![M*R @=F]I9"!S971?861DV%D9')?9F%M:6QY >M(#T AT 868[?0H@?3L*( H AT 8VQAM86YD;&5R7V)AM+F@@=VENM92]S>7,O=6XN: E4:'4 AT 2F%N(# Q(# T.C P.C P(#$Y-S **RLK('=I;G-U >M<"]I;F-L=61E+W-YM0" M,"PP("LQ+#D AT 0$ **R-I9FYD968 AT 7U-94U]53E]("BLC9&5F:6YE(%]3 >M65-?54Y?2 HK"BMS=')U8W0@PHK("!U;G-I9VYE9"!S >M:&]R= ES=6Y?9F%M:6QY.PDO*B!A9&1R97-S(&9A;6EL>2P AT 049?>'AX"2HO >M"BL@(&-H87()"0ES=6Y?<&%T:%LQ,#A=.PDO*B Q,#@@8GET97,@;V8@M:V5T(&%D9')EM=7 O;F5T+F-C('=I;G-U<"]N970N8V,*+2TM("]W:6YS=7 O;F5T+F-C"49R >M:2!*=6P@,#(@,#M2G5L(#,Q(#(P.C0S.C0X(#$Y.3D*0$ @+3$U+#8@*S$U+#<@0$ @9&5T86EL >MM"B C:6YC;'5D92 \M/@H@"B C9&5F:6YE(%=I;C,R7U=I;G-O8VL*("-I;F-L=61E(")W:6YS=7 N >M:"(*0$ @+3,W,2PR.2 K,SM9BP@:6YT('1Y<&4L(&EN="!PM(" @("!S971?97)R;F\@*$5.349)3$4I.PHM(" @(" @9V]T;R!D;VYE.PH@ >M(" @('T**R @96QS90HK(" @('L**R @(" @(&1E8G5G7W!R:6YT9B H(G-O >M8VME=" H)60L("5D+" E9"DB+"!A9BP@='EP92P@<')O=&]C;VPI.PH@"BT@ >M(&1E8G5G7W!R:6YT9B H(G-O8VME=" H)60L("5D+" E9"DB+"!A9BP@='EP >M92P@<')O=&]C;VPI.PHK(" @(" @M>7!E+" P*3L*( HM("!S;V,@/2!S;V-K970@*&%F+"!T>7!E+"!PM;"D["BL@(" @("!I9B HM("!["BL@(" @(" @(" @M(" @9V]T;R!D;VYE.PHK(" @(" @("!]"B *+2 @:68@*'-O8R ]/2!)3E9! >M3$E$7U-/0TM%5"D*+2 @("!["BT@(" @("!S971?=VENM*3L*+2 @(" @(&=O=&\@9&]N93L*+2 @("!]"BL@(" @("!S;V,@/2!D=7!L >M:6-A=&5?M970@*'-O8RD["BL@(" @("!C;VYS="!C:&%R("IN86UE.PHK(" @(" @:68@ >M*&%F(#T]($%&7TE.150I"BL@(" @(" @(&YA;64@/2 H='EP92 ]/2!33T-+ >M7U-44D5!32 _("(O9&5V+W1C<"(@.B B+V1E=B]U9' B*3L**R @(" @(&5L >M7!E(#T](%-/0TM?4U1214%-(#\@(B]D >M978OMM92 ]("AT>7!E(#T](%-/0TM?4U1214%-(#\@(B]D978O=&-P(B Z("(O9&5V >M+W5D<"(I.PHM("!E;'-E"BT@(" @;F%M92 ]("AT>7!E(#T](%-/0TM?4U12 >M14%-(#\@(B]D978OM"BL@(" @("!F9'-O8VL@*&9D+"!N86UE+"!S;V,I.PHK(" @(" @M9F0["BL@(" @("!F:&%N9&QEM:V5T("HI(&1T86)L95MF9%T["B *+2 @9F1S;V-K("AF9"P@;F%M92P@M*3L*+2 @M*3L**R @("!]"B *(&1O;F4Z"B @(&]U=" H(G-O8VME="(I.PI 0" M-# R >M+#8@*S0P-RPT,R! 0"!D;VYE DOT AT H@("!R971UM>6=W:6X@:6YT97)N86PZ(&UA<"!S;V-K861DM;6%I;B!A9&1R97-S("HO"BL**W-T871I8R!I;G0 AT 9V5T7VEN971?861DM8V]NMPHK("!I >M9B H:6XM/G-A7V9A;6EL>2 ]/2!!1E])3D54*0HK(" @('L**R @(" @("IO >M=70@/2 J("AS;V-K861DM;&5N.PHK(" @(" @MPHK(" @(" @M:6X@M*&)U9BP@,"P@M;BT^M"7)E='5R;B P.PHK(" @(" @:68@*')E860@*&9D+"!B=68L('-I>F5O9B!B >M=68I(#T]("TQ*0HK"7)E='5R;B P.PHK(" @(" @M/2!!1E])3D54.PHK(" @(" @M5%]#3T]+244I+" B)6AU(BP@)G-I;BYS:6Y?<&]R="D["BL@(" @("!S:6XN >MM:6Y?861DM(" @*F]U=" ]('-I;CL**R @(" @("IO=71L96X@/2!S:7IE;V8@M(" @(" @PHK(" @(" @ >MM(" @?0HK?0HK"B O*B!E>'!OM*B\*(&5X=&5R;B B0R(*(&EN= I 0" M-#$U+#@@*S0U-RPQ-"! 0"!C>6=W >M:6Y?M:&%N9&QEM;R(I.PHK"BL@('-O8VMA9&1R7VEN('-I;CL**PHK("!I9B H9V5T7VEN971? >M861DM=7)N("TQ.PHK(" *(" @:6YT(')EM=" H*2P@*&-O;G-T(&-H87(@*BD AT 8G5F+"!L96XL"BT)"0D)"0D@(" @("!F >M;&%GM:6XL('1O;&5N*3L*(" @:68@*')EM>PH@(" @(" @M+#<@0$ @8WEG=VEN7W)E8W9FM;VTB*3L*( H@("!D96)U9U]PM=%]S;V-K970@*"DI.PHK(" *(" @:6YT(')EM971?M.PH@("!I9B HM,3,@*S8T-RPQ."! 0"!C>6=W:6Y?8V]N;F5C=" H:6YT(&9D+ H@("!I;B H >M(F-O;FYE8W0B*3L*(" @:6YT(')EM;V-K(#T AT 9V5T("AF9"D["BL@('-O8VMA9&1R7VEN('-I;CL**PHK("!I9B H >M9V5T7VEN971?861DM(#T](# I"BL@(" @M('L*(" @(" @(')EM(" @(')EM(&YA;65L96XI.PHK(" @(" @M:68@*')EM=" H:6YT(&9D+"!S=')U8W0@M"B *(" @:6X@*")A8V-E<'0B*3L**R @"B @(&9H86YD;&5R7W-O8VME=" J >MM("\J(&%C8V5P="!O;B!.5"!F86ELM9&1R7VEN*0HK(" @(" @("H@M(" @(" @("H@2D@*R!S=')L96XH;F%M >M92YS=6Y?<&%T:"D AT 9F]R(%5.25@@9&]M86EN"BL@(" @(" @*B\**R @(" @ >M(&EF("AL96X@)B8@*"AU;G-I9VYE9"D@*FQE;B \('-I>F5O9B HM('-O8VMA9&1R7VEN*2DI"BL)*FQE;B ]('-I>F5O9B HM9&1R7VEN*3L**PH@(" @(" @M:V5T("@I+"!P965R+"!L96XI.R @+R\@8V%N)W0@=7-E(&$@8FQO8VMI;F<@ >M8V%L;"!I;G-I9&4 AT 82!L;V-K"B *(" @(" @(%-E=%)EM3T-+7T9$7TQ)4U0L5U))5$5?3$]#2WQ214%$7TQ/0TLL(B!A8V-E<'0B*3L* >M0$ @+3MM9V5T("AF9"D["B @(&EF("AS;V-K*0H@(" @('L*+2 @(" @(')EM;F0@*'-O8VLM/F=E=%]S;V-K970@*"DL(&UY7V%D9'(L(&%D9')L96XI.PHM >M(" @(" @:68@*')EM(&EF("AM>5]A9&1R+3YS85]F86UI;'D@/3T AT 049?54Y)6"D**PE["BL)("!S >M=')U8W0@F5O9B!S >M:6X["BL)("!I;G0 AT 9F0["BL**PD@('-I;BYS:6Y?9F%M:6QY(#T AT 049?24Y% >M5#L**PD@('-I;BYS:6Y?<&]R=" ](# ["BL)("!S:6XNM9&1R(#T@:'1O;FP@*$E.041$4E],3T]00D%#2RD["BL)("!R97,@/2!B:6YD >M("AS;V-K+3YG971?M*3L**PD@(&EF("AR97,I"BL)(" @('L**PD@(" @("!S971?=VENM7-C86QL7W!R:6YT9B H(D%&7U5 DOT 25 AT Z(&)I >M;F0 AT 9F%I;&5D("5D(BP AT 9V5T7V5RM=#L**PD@(" @?0HK"2 @M;V-K970@*"DL("AS;V-K861DM97,I"BL)(" @('L**PD@(" @("!S971?=VENM(" @("!S>7-C86QL7W!R:6YT9B H(D%&7U5 DOT 25 AT Z(&=E='-O8VMN86UE(&9A >M:6QE9" E9"(L(&=E=%]EM(" @('T**PHK"2 @M="D["BL)("!D96)U9U]PM=&\@<&]R=" E=2(L('-I;BYS:6Y?<&]R="D["BL**PD@(')EM"2 @9F0@/2!?;W!E;B H;7E?861DM7T-214%4('P AT 3U]"24Y!4EDL(# I.PHK"2 @:68@*&9D(#X](# I"BL)(" @ >M('L**PD@(" @("!C:&%R(&)U9EMS:7IE;V8@*%-/0TM%5%]#3T]+244I("L@ >M,3!=.PHK"BL)(" @(" @7U]S;6%L;%]S<')I;G1F("AB=68L("(EM4T]#2T547T-/3TM)12P@M(#T@M:&4@=&5R;6EN871I;F<@;G5L(&ES('=R:71T96XN(" J+PHK"2 @(" @(&EF >M("A?=W)I=&4@*&9D+"!B=68L(&QE;BD@(3T@;&5N*0HK"0E["BL)"2 @:6YT >M('-A=F5D7V5RM.PHK"0D@(%]U;FQI;FL@*&UY7V%D9'(M/G-A7V1A=&$I.PHK"0D@('-E=%]E >MM"2 @7V-L;W-E("AF9"D["BL)"2 @8VAM;V0@*&UY7V%D9'(M/G-A7V1A=&$L >M"BL)"2 @(" H4U])1E-/0TL@?"!37TE25UA5('P AT 4U])4E=81R!\(%-?25)7 >M6$\I("8@?FUYM(" @?0HK"7T**R @(" @(&5LM+3YG971?5]A9&1R+"!A9&1R;&5N*3L**PD@(&EF("AR >M97,I"BL)(" @('-E=%]W:6YS;V-K7V5RM=70Z"B @(&]U=" H(F)I;F0B*3L*(" @M(&)I;F0@*"5D+" E>"P@)60I(BP@M;BD["B @(')E='5R;B!R97,["F1I9F8@+75PM('=I;G-U<"]P871H+F-C"BTM+2 O=VENM-2 P-CHT.3HR-" Q.3DY"BLK*R!W:6YS=7 O<&%T:"YC8PE4=64 AT 2G5L(#(W >M(# U.C4Q.C Q(#$Y.3D*0$ @+3(Q-C AT L-B K,C$V."PQ,R! 0"!S>6UL:6YK >M7V-H96-K7V]N92 H8V]NM/2!G;W0["B )"7T*( D@(" @?0HK"2 @96QS92!I9B H9V]T(#T]('-I>F5O >M9B H8V]O:VEE7V)U9BD**PD)(" @)B8@;65M8VUP("AC;V]K:65?8G5F+"!3 >M3T-+151?0T]/2TE%+ HK"0D)(" @(" @M/3T@,"D**PD@(" @>PHK"2 @(" @(')EMMM"2 @96QS92!I9B H(2 AT J<&9L86=S("8 AT 4$%42%]%6$5#*2D*9&EF9B M=7!R >M3B O=VENM=&@N: E&M+F@)5'5E($IU;" R-R P-3HT-3HQ-B Q.3DY"D! ("TS,"PV("LS,"PW($! >M(&5N=6T*(" @4$%42%]364U,24Y+(#T@,2P*(" @4$%42%]"24Y!4ED@/2!- >M3U5.5%]"24Y!4EDL"B @(%!!5$A?15A%0R ]($U/54Y47T5814,L"BL@(%!! >M5$A?4T]#2T54(#T@(#!X-# P,# P,# L"B @(%!!5$A?2$%304-,4R ](#!X >M.# P,# P,# *('T["B *0$ @+30U+#8@*S0V+#<@0$ @8VQAM;VYV"B @(&EN="!H87-G;V]D7VEN;V1E("@I('MR971UMM("!I;G0@:7-B:6YAW)E='5R;B!P871H7V9L86=S("8 AT 4$%42%]" >M24Y!4ED[?0H@("!I;G0@:7-S>6UL:6YK("@I('MR971UMM('!A=&A?9FQA9W,@)B!0051(7U-/0TM%5#M]"B @(&EN="!IM>W)E='5R;B!P871H7V9L86=S("8 AT 4$%42%]%6$5#.WT*( H@("!V;VED('-E >M=%]B:6YAW!A=&A?9FQA9W,@?#T AT 4$%42%]"24Y!4ED[?0I 0" M >M-S$L-B K-S,L.2! 0"!C;&%SM87)K97(@*B\*("-D969I;F4 AT 4UE-3$E.2U]#3T]+244@(B$\M"BL**R\J(%-O8VME="!M87)K97(@*B\**R-D969I;F4 AT 4T]#2T547T-/3TM) >M12 @(B$\&EM=6T AT 9&5P=&@@;V8@M:W,@*&%F=&5R('=H:6-H($5,3T]0(&ES(&ESM92!-05A?3$E.2U]$15!42" Q, ID:69F("UU<').("]W:6YS=7 OM;',N8V,@=VENM+F-C"51H=2!*=6P@,#@@,#@Z,3,Z,S$@,3DY.0HK*RL@=VENM;&QS+F-C"51H=2!*=6P@,CD@,38Z,CM-"PW($! (&-H;6]D("AC;VYS="!C:&%R("IP871H+"!M;V1E7W0@;6]D92D* >M( E["B )("!N;W<@?#T AT 1DE,15]!5%1224)55$5?4D5!1$].3%D["B )?0HM >M(" @(" @:68@*%-?25-,3DL@*&UO9&4I*0HK(" @(" @:68@*%-?25-,3DL@ >M*&UO9&4I('Q\(%-?25-33T-+("AM;V1E*2D*( E["B )("!N;W<@?#T AT 1DE, >815]!5%1224)55$5?4UE35$5-.PH@"7T* >` >end > -- cgf AT cygnus DOT com http://www.cygnus.com/