Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - setup io-pkt without disabling io-net: (6 Items)
   
setup io-pkt without disabling io-net  
I have an application which uses Libpcap, more specifically I need to be able to read and write on an ethernet adapter.
Read operation can be achieved with io-net and nfm-bpf.so but write operation is not possible (unless paying for nfm-
nraw.so)
To be able to write I have been advised to use io-pkt instead of io-net because it seems to be directly compatible with 
LIbpcap.
So I looked at the wiki and put these files in a io-pkt directory:
io-pkt-v4-hc, io-pkt-v6-hc, libsocket.so, devnp-shim.so, devnp-i82544.so 
ifconfig, netstat,nicinfo =>there are prebuilt binaries I have dowloaded from the site.
After that I typed 

export LD_LIBRARY_PATH=/home/pc236/io-pkt:$LD_LIBRARY_PATH
export PATH=/home/pc236/io-pkt:$PATH
export SOCK=/alt

and then lost the connexion with the target qnx (Because I run qnx from telnet on a windows computer)
When I tried to ping the target qnx I got no answer so I am afraid I deleted or disabled io-net.
So how do I fix it up (without reinstall qnx if possible).
And then, how can I install io-pkt correctly (I read about staging directory but don't know how to install io-pkt in it)
?
RE: setup io-pkt without disabling io-net  
Hmmm... Why have "SOCK=/alt" exported?  This assumes that you're running a
version of the stack with the "prefix=/alt" option provided.  If not, then
libsocket is going to be trying to connect into a non-existent stack.


Where were the export commands executed (in the telnet shell or as part of
the boot up process)?

Do you have a command line that you can get into on your target?  What does
"pidin ar" say?
 
How are you invoking the stack (what are your command line arguments)?

	Robert.




-----Original Message-----
From: j v [mailto:jeanmarieverret@gmail.com] 
Sent: Tuesday, March 11, 2008 12:10 PM
To: builds-networking
Subject: setup io-pkt without disabling io-net

I have an application which uses Libpcap, more specifically I need to be
able to read and write on an ethernet adapter.
Read operation can be achieved with io-net and nfm-bpf.so but write
operation is not possible (unless paying for nfm-nraw.so)
To be able to write I have been advised to use io-pkt instead of io-net
because it seems to be directly compatible with LIbpcap.
So I looked at the wiki and put these files in a io-pkt directory:
io-pkt-v4-hc, io-pkt-v6-hc, libsocket.so, devnp-shim.so, devnp-i82544.so 
ifconfig, netstat,nicinfo =>there are prebuilt binaries I have dowloaded
from the site.
After that I typed 

export LD_LIBRARY_PATH=/home/pc236/io-pkt:$LD_LIBRARY_PATH
export PATH=/home/pc236/io-pkt:$PATH
export SOCK=/alt

and then lost the connexion with the target qnx (Because I run qnx from
telnet on a windows computer)
When I tried to ping the target qnx I got no answer so I am afraid I deleted
or disabled io-net.
So how do I fix it up (without reinstall qnx if possible).
And then, how can I install io-pkt correctly (I read about staging directory
but don't know how to install io-pkt in it)?

_______________________________________________
Builds
http://community.qnx.com/sf/go/post5696
Re: RE: setup io-pkt without disabling io-net  
First thing, It seems I have not damaged qnx installation. Again, I am able to connect to the target qnx. (may be 
explained because we're several on the same target)
To answer your questions,
- "SOCK=/alt": I just did a copy/paste operation of the wiki changing the directory. I don't really know what it does, 
from what you said it seems it specifies an option for libsocket 
- the export commands were executed in the telnet shell and I don't have a command line on the target
- pidin ar give the following result:

# pidin ar
     pid Arguments
       1 procnto
       2 /sbin/tinit
    4099 pci-bios
    4100 slogger -s32
    4101 io-usb -duhci -dohci -dehci
    4102 io-hid -d ps2ser kbd:kbddev:ps2mouse:mousedev -d usb /dev/io-usb/io-usb
    4103 devc-con-hid -n4
    8200 devb-eide blk auto=partition dos exe=all cam quiet
    8201 umass-enum -h hd -d /dev -m /fs/hd -f /proc/boot/umass-enum.cfg
   16394 pipe
   20491 mqueue
   77838 devc-ser8250 -u1 3f8,4 -u2 2f8,3
   77841 devc-par -p0x378
   77843 io-net -ptcpip
  110614 spooler -d/dev/par1
  135183 devc-pty -n 32
  139280 random -t
  151572 dumper -d /var/dumps
  188437 inetd
  196632 syslogd
  213015 login
  213017 login
  213018 login
  213019 login
  225292 in.telnetd
  229389 -sh
  274450 pidin ar

But anyway, now that I can connect to the target I just need to install io-pkt in a staging directory if I read the wiki
 correctly.
How can I do that???




Hmmm... Why have  exported?  This assumes that you're running a
version of the stack with the "prefix=/alt" option provided.  If not, then
libsocket is going to be trying to connect into a non-existent stack.


Where were the export commands executed (in the telnet shell or as part of
the boot up process)?

Do you have a command line that you can get into on your target?  What does
"pidin ar" say?
 
How are you invoking the stack (what are your command line arguments)?

	Robert.
RE: RE: setup io-pkt without disabling io-net  
I think you're probably misinterpreting the wikis...  
http://community.qnx.com/sf/wiki/do/viewPage/projects.networking/wiki/Source
_Guide

At the bottom "How do I use what I built".  Note the comment "don't forget
to slay io-net before starting io-pkt"

http://community.qnx.com/sf/wiki/do/viewPage/projects.networking/wiki/Faq_wi
ki_page

The section "How do I run io-pkt?" covers how you start the stack with an
"alternate" socket interface (which utilizes the SOCK var).

"Can I run io-net and io-pkt at the same time on one machine?" mentions the
need for having two network cards.

The FAQ is indeed confusing from this respect.  I've removed the SOCK=
option from the general script and beefed up the description of io-net /
io-pkt in particular.


Essentially, you need to both install and run the io-pkt executables.  Given
that you're trying to replace the networking stack, doing this through a
protocol (telnet) that requires networking won't work unless you have more
than one interface for the stacks to use (i.e. one interface for io-net and
one for io-pkt).  From what I can see with the pidin, io-pkt isn't running
and io-net has probably been started using the enumerators (which means it
probably has "taken over" all networking hardware).

My recommendation:

Make sure that you have the appropriate executables installed on your system
and that you know which driver is required by your hardware.

From a command line interface (NOT telnet)

export LD_LIBRARY_PATH=/home/pc236/io-pkt:$LD_LIBRARY_PATH
export PATH=/home/pc236/io-pkt:$PATH

io-pkt-v4 -d (whatever your driver is)
dhcp.client


and this replaces io-net with io-pkt.  Because you're doing this in a
command line (and not as part of the startup), when you re-boot the box
it will revert back to io-net.  If you want to telnet into the box, you
should also install the new inetd that comes with io-pkt and run it as well.


	Robert.





-----Original Message-----
From: j v [mailto:jeanmarieverret@gmail.com] 
Sent: Wednesday, March 12, 2008 4:32 AM
To: builds-networking
Subject: Re: RE: setup io-pkt without disabling io-net

First thing, It seems I have not damaged qnx installation. Again, I am able
to connect to the target qnx. (may be explained because we're several on the
same target)
To answer your questions,
- "SOCK=/alt": I just did a copy/paste operation of the wiki changing the
directory. I don't really know what it does, from what you said it seems it
specifies an option for libsocket 
- the export commands were executed in the telnet shell and I don't have a
command line on the target
- pidin ar give the following result:

# pidin ar
     pid Arguments
       1 procnto
       2 /sbin/tinit
    4099 pci-bios
    4100 slogger -s32
    4101 io-usb -duhci -dohci -dehci
    4102 io-hid -d ps2ser kbd:kbddev:ps2mouse:mousedev -d usb
/dev/io-usb/io-usb
    4103 devc-con-hid -n4
    8200 devb-eide blk auto=partition dos exe=all cam quiet
    8201 umass-enum -h hd -d /dev -m /fs/hd -f /proc/boot/umass-enum.cfg
   16394 pipe
   20491 mqueue
   77838 devc-ser8250 -u1 3f8,4 -u2 2f8,3
   77841 devc-par -p0x378
   77843 io-net -ptcpip
  110614 spooler -d/dev/par1
  135183 devc-pty -n 32
  139280 random -t
  151572 dumper -d /var/dumps
  188437 inetd
  196632 syslogd
  213015 login
  213017 login
  213018 login
  213019 login
  225292 in.telnetd
  229389 -sh
  274450 pidin ar

But anyway, now that I can connect to the target I just need to install
io-pkt in a staging directory if I read the wiki correctly.
How can I do that???




Hmmm... Why have  exported?  This assumes that you're running a
version of the stack with the "prefix=/alt" option provided.  If not, then
libsocket is going to be trying to connect into a non-existent stack.


Where were the export commands executed (in the telnet shell or as part of
the boot up process)?

Do you have a command line that...
View Full Message
Re: RE: RE: setup io-pkt without disabling io-net  
First, Thanks a lot for your detailed answers and your patience.

I have one more question though (last one I promess).
       When qnx is launched I log in and then I have access to a command line interface (CLI). (#login: root then #...)
Is  it ok for me to work in that CLI, or is it what you meant by "startup "? 
RE: RE: RE: setup io-pkt without disabling io-net  
Hi:
	Feedback is always welcome.  If you're having problems, then it
likely means that the information that you're getting isn't quite where it
needs to be :>.

The CLI that you get on boot is indeed what you should be working with to
get io-pkt running.

	Robert.

-----Original Message-----
From: j v [mailto:jeanmarieverret@gmail.com] 
Sent: Wednesday, March 12, 2008 11:44 AM
To: builds-networking
Subject: Re: RE: RE: setup io-pkt without disabling io-net

First, Thanks a lot for your detailed answers and your patience.

I have one more question though (last one I promess).
       When qnx is launched I log in and then I have access to a command
line interface (CLI). (#login: root then #...)
Is  it ok for me to work in that CLI, or is it what you meant by "startup "?



_______________________________________________
Builds
http://community.qnx.com/sf/go/post5734