SGI: Development

my first port: gXipmsg - Page 2

Code: Select all

# /usr/Motif-2.1/lib/mksymlinks


That one actually helps, and gXipmsg compiles. thanks.
kubatyszko wrote: Per Motif 2.1 porting guide:

Code:
If you need to change the default environment to 2.1, enter (as root) the following command:
# /usr/Motif-2.1/lib/mksymlinks
To return the default environment to 1.2, enter:
# /usr/Motif-1.2/lib/mksymlinks


Worked for me like a charm.
Yes! this is it! thanks kubatyszko!!

kubatyszko wrote: Geo, on a sidenote, you can create a Makefile.irix with the contents you suggested, and ask the user to run
Code:
make -f Makefile.irix
- this way you keep the project closer to original
ok! will add this to the next release. so which one is more preferable, should the makefile check what version used then echo a message to run the script? or should i run the script automatic thru makefile?

kubatyszko wrote: Btw, it doesn't work on my Freebsd 8.1-release, I log into by bsd box from OSX over SSH (with X-forwarding) - it does compile flawlessly, launches (on my remote X session in the OSX) with the docked icon, but when I click on the icon I get :
hmm thanks for this report, i will find a way to replicate this here.

my test machine for FreeBSD is only under VirtualBox, and im still trying to figure out why i cannot send or receive UDP protocol, is there a default firewall after a fresh install? if yes, how can i disable it or put the port in use as unfiltered? sorry for this noob questions :) but yes, the build is ok on FreeBSD, but once i click the button, no members are found, so its either the UDP broadcast was not able to get out, or the UDP replies was not able to get in :( any advice is very welcome :) will also dig more here..

ok will try replicate your case later maybe using cygwin as you MacOS X then IRIX/SUN/FreeBSD as your FreeBSD, will keep posted!!

im afraid maybe my coding or the design of my Motif application didn't follow standards that's why it crashed? hmmm

canavan wrote: Code:
# /usr/Motif-2.1/lib/mksymlinks


That one actually helps, and gXipmsg compiles. thanks.
thanks too for the confirmation canavan!
:Octane: (Sakura) :O2: (Sasuke) :1600SW: (Naruto) ... lil Jesse! (O2 laptop)
“Imagination is more important than knowledge.“ – A. Einstein
btw kubatyszko, is it ok for you to try it run on FreeBSD without using OSX over SSH? Just want to confirm if the app only crash with X-forwarding? hmm still planning how to replicate coz i try it wiht cygwin and vmware, didnt work, maybe configurations? will dig more and update soon..
:Octane: (Sakura) :O2: (Sasuke) :1600SW: (Naruto) ... lil Jesse! (O2 laptop)
“Imagination is more important than knowledge.“ – A. Einstein
update on cygwin with IRIX: i was able to try during lunch break do a xwin :1 -query O2 and try to run gXipmsg, it was doing ok as expected. But i'm not sure by doing this, does this simulate your case of from MacOSX to FreeBSD?
:Octane: (Sakura) :O2: (Sasuke) :1600SW: (Naruto) ... lil Jesse! (O2 laptop)
“Imagination is more important than knowledge.“ – A. Einstein
update on FreeBSD: The reason why i cannot receive any UDP packets is because the broadcast address that i use is 255.255.255.255, in which FreeBSD doesn't allow this? when i try 192.168.0.255, it worked, but it was not able to receive from 192.168.10.x stations. I'm still gathering info and see which approach i will choose.

Does this scenario depends on the OS? coz for Windows, Ubuntu, Solaris, all are doing fine with 255.255.255.255
For IRIX, it is also ok with 255.255.255.255, but what i notice before, i think is also was limited, not able to hear from 192.168.10.x
If so, i should have a special case for BSD and IRIX right? Or is there a configuration that i need to set so that they will perform like the rest of the tested OS?

New release coming soon with bug fixes and some enhancements ;)
File transfer, i'm still drafting the UI, ciao!
:Octane: (Sakura) :O2: (Sasuke) :1600SW: (Naruto) ... lil Jesse! (O2 laptop)
“Imagination is more important than knowledge.“ – A. Einstein
Is there a router inbetween? 255.255.255.255 is link-local and will not be passed through routers. You'll need to extract the network broadcast address if you want to broadcast to an amorphous network.
:Octane: halo , oct ane Image knightrider , d i g i t a l AlphaPC164, pond , soekris net6501, misc cool stuff in a rack
N.B.: I tend to talk out of my ass. Do not take it too seriously.
duck wrote: Is there a router inbetween? 255.255.255.255 is link-local and will not be passed through routers. You'll need to extract the network broadcast address if you want to broadcast to an amorphous network.
hi duck! hmm i think so coz im testing this here in our office. but if so, how come if i run this same application under cygwin, solaris, ubuntu, and winxp on the same PC, they all are fine, so maybe there something about configuration needed on freebsd? yes i read about extracting broadcast address and i tried that option, but this will limit me compared of using 255.255.255.255
:Octane: (Sakura) :O2: (Sasuke) :1600SW: (Naruto) ... lil Jesse! (O2 laptop)
“Imagination is more important than knowledge.“ – A. Einstein
geo wrote:
duck wrote: Is there a router inbetween? 255.255.255.255 is link-local and will not be passed through routers. You'll need to extract the network broadcast address if you want to broadcast to an amorphous network.
hi duck! hmm i think so coz im testing this here in our office. but if so, how come if i run this same application under cygwin, solaris, ubuntu, and winxp on the same PC, they all are fine, so maybe there something about configuration needed on freebsd? yes i read about extracting broadcast address and i tried that option, but this will limit me compared of using 255.255.255.255


Some OSes only allow root to send broadcast messages, perhaps that's it?

Googled around for a bit and found this tidbit... still extant perhaps? http://lists.freebsd.org/pipermail/free ... 08626.html
:Octane: halo , oct ane Image knightrider , d i g i t a l AlphaPC164, pond , soekris net6501, misc cool stuff in a rack
N.B.: I tend to talk out of my ass. Do not take it too seriously.
duck wrote: Some OSes only allow root to send broadcast messages, perhaps that's it?
wow! this one i didn't hear hehe but hmmm i think im sure i use root account as always on all my test machines, but ok will verify this tomorrow coz i don't have FreeBSD here in my room, thanks for this info!

duck wrote: Googled around for a bit and found this tidbit... still extant perhaps? http://lists.freebsd.org/pipermail/free ... 08626.html
wow! i think this is perfect match on my case, thanks for this great find! but hmm as mentioned inside, he resolve it by using the networks broadcast address instead of 255.255.255.255, in which i already tried and will affect the area of my broadcasting. unlike using 255.255.255.255, this can still go to other subnets. i wonder how windows handled this...

oh! wait! i read you link again and now i realize i missed something on his resolution, its the MAC address! so i guess i need to hard code so that when i broadcast to 255.255.255.255, i will send it to MAC address ff:ff:ff:ff:ff:ff, right?

geeez if this works, i owe you much duck! btw, the rotating cube logo still on queue for you ;)
:Octane: (Sakura) :O2: (Sasuke) :1600SW: (Naruto) ... lil Jesse! (O2 laptop)
“Imagination is more important than knowledge.“ – A. Einstein
geo wrote:
duck wrote: Googled around for a bit and found this tidbit... still extant perhaps? http://lists.freebsd.org/pipermail/free ... 08626.html
wow! i think this is perfect match on my case, thanks for this great find! but hmm as mentioned inside, he resolve it by using the networks broadcast address instead of 255.255.255.255, in which i already tried and will affect the area of my broadcasting. unlike using 255.255.255.255, this can still go to other subnets. i wonder how windows handled this...

oh! wait! i read you link again and now i realize i missed something on his resolution, its the MAC address! so i guess i need to hard code so that when i broadcast to 255.255.255.255, i will send it to MAC address ff:ff:ff:ff:ff:ff, right?

geeez if this works, i owe you much duck! btw, the rotating cube logo still on queue for you ;)


I just had a friend ping 255.255.255.255 on his FreeBSD 9.0-RELEASE, it seems to have the same flaw. My NetBSD system does not. (obviously, netbsd rocks ;-)

I guess sending to the right MAC will work, but you'll be assembling raw packets by then...

More on this, an official, ignored, bug report: http://lists.freebsd.org/pipermail/freebsd-bugs/2006-June/019201.html

See also message thread beginning at: http://lists.freebsd.org/mailman/htdig/freebsd-net/2007-January/012874.html
:Octane: halo , oct ane Image knightrider , d i g i t a l AlphaPC164, pond , soekris net6501, misc cool stuff in a rack
N.B.: I tend to talk out of my ass. Do not take it too seriously.
duck wrote: I just had a friend ping 255.255.255.255 on his FreeBSD 9.0-RELEASE, it seems to have the same flaw. My NetBSD system does not. (obviously, netbsd rocks
oh! ok thanks for confirming, then not all BSD have this flaw then hehe time to download NetBSD and OpenBSD and give them a try tomorrow to see which is which for my BSD makefile

duck wrote: I guess sending to the right MAC will work, but you'll be assembling raw packets by then...
hmm im not sure what you mean here but what i thought at first is i just need to fill some items on the struct sockaddr_in that will contain the MAC address? but when checking the structure it doesn't have, my wrong assumption about
encapsulates the packet using the MAC address
so how does the encapsulation done? btw, no problem with assembling raw packets here, i guess already done this inside :)

duck wrote: More on this, an official, ignored, bug report: http://lists.freebsd.org/pipermail/free ... 19201.html
hmm so this indeed a flaw.. why did they ignore this? tsk3.. anyway thanks for this infos duck really help, so i guess will try the encapsulation of MAC just for FreeBSD then, will see tomorrow ;)
:Octane: (Sakura) :O2: (Sasuke) :1600SW: (Naruto) ... lil Jesse! (O2 laptop)
“Imagination is more important than knowledge.“ – A. Einstein
geo wrote:
duck wrote: I just had a friend ping 255.255.255.255 on his FreeBSD 9.0-RELEASE, it seems to have the same flaw. My NetBSD system does not. (obviously, netbsd rocks
oh! ok thanks for confirming, then not all BSD have this flaw then hehe time to download NetBSD and OpenBSD and give them a try tomorrow to see which is which for my BSD makefile

duck wrote: I guess sending to the right MAC will work, but you'll be assembling raw packets by then...
hmm im not sure what you mean here but what i thought at first is i just need to fill some items on the struct sockaddr_in that will contain the MAC address? but when checking the structure it doesn't have, my wrong assumption about
encapsulates the packet using the MAC address
so how does the encapsulation done? btw, no problem with assembling raw packets here, i guess already done this inside :)

duck wrote: More on this, an official, ignored, bug report: http://lists.freebsd.org/pipermail/free ... 19201.html
hmm so this indeed a flaw.. why did they ignore this? tsk3.. anyway thanks for this infos duck really help, so i guess will try the encapsulation of MAC just for FreeBSD then, will see tomorrow ;)


Seems like I was a little hasty, there was some discussion about it (actual PR here: http://www.freebsd.org/cgi/query-pr.cgi?pr=99558&cat= ), however I'm not really sure how they can call it fixed if it isn't :-)

As for sockaddr_in, no you can't just set the target MAC there, you will have to assemble IP packets and use a raw socket to work around it that way. It might however be possible with some freebsd specific option, that IP_ONESCAST Thing they talk about to make undirected broadcasts work properly.
:Octane: halo , oct ane Image knightrider , d i g i t a l AlphaPC164, pond , soekris net6501, misc cool stuff in a rack
N.B.: I tend to talk out of my ass. Do not take it too seriously.
duck wrote: Seems like I was a little hasty, there was some discussion about it (actual PR here: http://www.freebsd.org/cgi/query-pr.cgi?pr=99558&cat= ), however I'm not really sure how they can call it fixed if it isn't
aha! this is more detailed now hmm did a quick read and it seems this can be considered a quick fix? will try to absorb this again tomorrow, a bit late here already :) thanks for this digging duck! these info somehow teach me something ;)

duck wrote: As for sockaddr_in, no you can't just set the target MAC there, you will have to assemble IP packets and use a raw socket to work around it that way. It might however be possible with some freebsd specific option, that IP_ONESCAST Thing they talk about to make undirected broadcasts work properly.
ah i see, thanks for this clarification. ok2 will try this tomorrow on my FreeBSD and see the outcome, will feedback soon :) hmm i wonder if this IP_ONESCAST can be aslo used to other OS? so that no need to do a uname inside my code hehe but anyway, not so big deal. ok duck, thanks again for the help! will feedback tomorrow ciao!!
:Octane: (Sakura) :O2: (Sasuke) :1600SW: (Naruto) ... lil Jesse! (O2 laptop)
“Imagination is more important than knowledge.“ – A. Einstein
FreeBSD's ip(4) man page has the gist of how to use it:

Code: Select all

If the IP_ONESBCAST option is enabled on a SOCK_DGRAM or a SOCK_RAW
socket, the destination address of outgoing broadcast datagrams on that
socket will be forced to the undirected broadcast address,
INADDR_BROADCAST, before transmission.  This is in contrast to the
default behavior of the system, which is to transmit undirected broad-
casts via the first network interface with the IFF_BROADCAST flag set.

This option allows applications to choose which interface is used to
transmit an undirected broadcast datagram.  For example, the following
code would force an undirected broadcast to be transmitted via the inter-
face configured with the broadcast address 192.168.2.255:

char msg[512];
struct sockaddr_in sin;
u_char onesbcast = 1;   /* 0 = disable (default), 1 = enable */

setsockopt(s, IPPROTO_IP, IP_ONESBCAST, &onesbcast, sizeof(onesbcast));
sin.sin_addr.s_addr = inet_addr("192.168.2.255");
sin.sin_port = htons(1234);
sendto(s, msg, sizeof(msg), 0, &sin, sizeof(sin));

It is the application's responsibility to set the IP_TTL option to an
appropriate value in order to prevent broadcast storms.  The application
must have sufficient credentials to set the SO_BROADCAST socket level
option, otherwise the IP_ONESBCAST option has no effect.


It lives here
:Octane: halo , oct ane Image knightrider , d i g i t a l AlphaPC164, pond , soekris net6501, misc cool stuff in a rack
N.B.: I tend to talk out of my ass. Do not take it too seriously.
duck wrote: It lives here
guess what? IT WORK!!! you're the man duck!! i even think this approach on FreeBSD did better than the others? coz when i try it, it even got a response to more deeper subnets that the other OS can't, but will investigate more maybe i can also use the IP_ONESBCAST option for other OS, or its just for FreeBSD, lets see..

btw i tried to install NetBSD on VBox, was ok but when i try to mount an nfs, didn't work, seems no nfs client on default setup? unlike PCBSD and FreeBSD, all are ready. Also tried install OpenBSD, but installation hang-up by the time to choose the "i" for install.. need to check on this.. maybe these OS doesn't like VBox? will see too..

so i guess case close :) really thanks duck for the help, will release another version soon with some enhancements, ciao!
:Octane: (Sakura) :O2: (Sasuke) :1600SW: (Naruto) ... lil Jesse! (O2 laptop)
“Imagination is more important than knowledge.“ – A. Einstein
hi guys, almost done with polishing ALPHA and will release soon :)
btw got some questions that i'm stuck with and afters this will be fine:

1. I got a xpm image file and this should be on the same path as the binary file so that if invoked, the image will be displayed. but if i try to invoke the binary on a different pwd, it seems it cannot find the xpm, which also make sense. my question is how is this properly handled? my test case is put binary and xpm file in /usr/bin/, then try invoke gXipmsg in any location, it will run but ni image displayed.

2. How can i set under a custom dialog to make the text widget have the first focus? already tried initialfocus but i cant make it work :(

Lunch break!
:Octane: (Sakura) :O2: (Sasuke) :1600SW: (Naruto) ... lil Jesse! (O2 laptop)
“Imagination is more important than knowledge.“ – A. Einstein
dirname(realpath(argv[0])) should be a handy enough trick to get the path, at least on unix.
:Octane: halo , oct ane Image knightrider , d i g i t a l AlphaPC164, pond , soekris net6501, misc cool stuff in a rack
N.B.: I tend to talk out of my ass. Do not take it too seriously.
duck wrote: dirname(realpath(argv[0])) should be a handy enough trick to get the path, at least on unix.

geeez duck, you always save me!! thanks man!! i tried this and it was perfect!! but after some other test cases, it still had the glitch.. also noticed is on different OS has its own different behavior, i know its strange coz it should be the same coz its UNIX! but let me dig around more, maybe just got it wrong, will let you know soon ;)

thanks for the FreeBSD help, all platforms are well tested now, except for NetBSD and OpenBSD, still don't have a working system coz VirualBox seems doesn't like them.. will see ;)
:Octane: (Sakura) :O2: (Sasuke) :1600SW: (Naruto) ... lil Jesse! (O2 laptop)
“Imagination is more important than knowledge.“ – A. Einstein
hi everyone! just can't wait to announce this one hehe so before i sleep, behold: BETA 1.0 is here!

this includes:
* more stable
* enhanced UI
* most anticipated: VERY FAST download of unlimited files from any Windows that runs IPMsg

So who needs USB, SFU/NFS, SAMBA, FTP to transfer your files like pictures, CAD drawings, MP3s, movies from modern machines to our beloved UNIX if we have this very light tool ;)

As of the moment, this version only can accept files. Coming soon are:
* download folders
* sending files
* sending folders
So that a full file sharing between any UNIX flavor and Windows is as easy as sending an email :)

So, hope you guys can try this for me? Thanks in advance for your feedback :) Already tried many file types and LARGE size like 700MB, my estimate is almost 1min plus? but im sure this was faster than my NFS setup at the office hehe

So here you go:

For those who can compile with MIPSPro:
gXipmsg src.zip
(20.89 KiB) Downloaded 54 times

Then do:
make
make install
gXipmsg <handlename> (eg. gXipmsg geo)

Then for now, all downloads will be place on /etc/gXipmsg/Downloads/, will enhance this more later
But for the moment, just take use of the speed of this, cheers!!


For those who cannot compile:
Please put under /usr/bin/
bin.zip
(25.82 KiB) Downloaded 62 times

Please put under /etc/
etc.zip
(590 Bytes) Downloaded 63 times



To try the file download, please install IPMsg in your Windows box, then drag and drop the files that you want to send to the text box, then press send, then it will arrive on the gXipmsg on our UNIX side, hope you have fun!

So will sleep now, bis bald!!


pssst hamei, i think you gonna like this more, now you can ask any files from your assistants PC directly to your Fuel ;) As soon as next version, you can also pass from your Fuel to her PC ;)
:Octane: (Sakura) :O2: (Sasuke) :1600SW: (Naruto) ... lil Jesse! (O2 laptop)
“Imagination is more important than knowledge.“ – A. Einstein
geo wrote: hi everyone! just can't wait to announce this one hehe so before i sleep, behold: BETA 1.0 is here!

this includes:
* more stable
* enhanced UI
* most anticipated: VERY FAST download of unlimited files from any Windows that runs IPMsg

So who needs USB, SFU/NFS, SAMBA, FTP to transfer your files like pictures, CAD drawings, MP3s, movies from modern machines to our beloved UNIX if we have this very light tool ;)

As of the moment, this version only can accept files. Coming soon are:
* download folders
* sending files
* sending folders


That's nice, thanks! I will try to find a Windows box for testing... ;-)
:O2: :Indy: :Indy: