how to use IPX protocol in socket?

This is a discussion on how to use IPX protocol in socket? within the Linux Networking forums, part of the Linux Forums category; my linux box setting is.. minsu@minsu:~/ipx> ls mars_nwe mars_nwe-0.99.pl20.tgz ncpfs-2.2.1 ...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-13-2005
minsu.kim@gmail.com
 
Posts: n/a
Default how to use IPX protocol in socket?

my linux box setting is..

minsu@minsu:~/ipx> ls
mars_nwe mars_nwe-0.99.pl20.tgz ncpfs-2.2.1 ncpfs-2.2.1.tar.gz
minsu@minsu:~/ipx> cat /proc/net/ipx/interface
Network Node_Address Primary Device Frame_Type
32A10103 4C0010389A73 Yes eth0 EtherII
ABCD1234 4C0010389A73 No eth0 802.2
minsu@minsu:~/ipx> cat /proc/net/ipx/route
Network Router_Net Router_Node
ABCD1234 Directly Connected
32A10103 Directly Connected
minsu@minsu:~/ipx> cat /proc/net/ipx/socket
Local_Address Remote_Address Tx_Queue Rx_Queue State
Uid
minsu@minsu:~/ipx>

----

source code ..

int
main(int argc, char **argv)
{
struct sockaddr_ipx sipx;
int s;
int result;
char msg[100] = "blah blah..";
int len = sizeof(sipx);

s = socket(AF_IPX, SOCK_DGRAM, AF_IPX);
if (s < 0)
{
perror("IPX: socket: ");
exit(-1);
}
sipx.sipx_family = AF_IPX;
sipx.sipx_network = 0;.
sipx.sipx_port = 0;
sipx.sipx_type = 4;

sipx.sipx_node[0] = 0xFF;
sipx.sipx_node[1] = 0xFF;
sipx.sipx_node[2] = 0xFF;
sipx.sipx_node[3] = 0xFF;
sipx.sipx_node[4] = 0xFF;
sipx.sipx_node[5] = 0xFF;


result = bind(s, (struct sockaddr *) &sipx, sizeof(sipx));
if (result < 0)
{
perror("IPX: bind: ");
exit(-1);
}
result = getsockname(s, (struct sockaddr *) &sipx, &len);
result = sendto(s, msg, sizeof(msg), 0, (struct sockaddr *) &sipx,
sizeof(sipx));
if (result < 0)
{
perror("IPX: send: ");
exit(-1);
}
return 0;
}
----EOF---

this ipx Sample example works well in local network. but
i want to broadcast send and recv my ipx packet in network PC. ( I use
10.x.x.x IP )
how fix that code?

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 11:30 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0