Networking Forums

Networking Forums > Computer Networking > Linux Networking > how to use IPX protocol in socket?

Reply
Thread Tools Display Modes

how to use IPX protocol in socket?

 
 
minsu.kim@gmail.com
Guest
Posts: n/a

 
      06-13-2005, 11:59 AM
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
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 On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
linux socket programming and HTTP Protocol Problem PGHULME Linux Networking 1 08-21-2006 09:35 PM
socket(,,protocol): when htons? Sam Steingold Linux Networking 4 10-12-2005 04:27 PM
Protocol Chart - Learn how to use a Protocol Analyzer news.comcast.giganews.com Windows Networking 0 08-21-2004 04:44 PM
Help needed with "Can't start server : UNIX Socket : Address family not supported by protocol" Oliver Linux Networking 1 02-13-2004 01:21 PM
TCP/IP protocol missing from ME's protocol install options Hayse Windows Networking 1 07-21-2003 10:48 PM



1 2 3 4 5 6 7 8 9 10 11