Feed for discussion io-net migration in project Networking.
http://community.qnx.com/sf/discussion/do/listTopics/projects.networking/discussion.io_net_migration
Posts for io-net migrationpost122517: Re: Multiple Interfaces in QNX 6.4.1
http://community.qnx.com/sf/go/post122517
> Hi,
>
> We have a computer with 2 voards.
> 1 of the CPU connects to the network using DHCP and it also connects to the
> other CPU using Serial over TCP communication.
>
> I am porting this project from 6.3.1.
> The earlier code was:
> The earlier code for having the network up for the CC project(Lower Board) was
> :
>
> io-net -dspeedo -dfd fd=/dev/ser1,mac=000102030405,ahdlc -ptcpip
>
> ifconfig en1 1.1.1.1 netmask 255.255.255.252
>
> For the MC project (Upper Board) it was:
>
> io-net -dspeedo -dfd fd=/dev/ser1,mac=000102030406,ahdlc -ptcpip
>
> ifconfig en1 1.1.1.2 netmask 255.255.255.252
>
>
>
> As we can see that there were two interfaces en0 and en1.
>
> Since we connect the lower board’s Ethernet port to the network so the lower
> board was getting 2 IP’s for 2 different interfaces.
>
> The interface en1 of the lower board was used to communicate with the upper
> board and the interface en0 was used to communicate with the network.
>
> But i dont know how can we have multiple interfaces in QNX 6.4.1.
> I could not see an appropriate answer when I searched through web
>
> Please Help.
>
> no
>
>osama salm2024-04-03T01:42:16Zpost122516: Re: Multiple Interfaces in QNX 6.4.1
http://community.qnx.com/sf/go/post122516
Noosama salm2024-04-03T01:41:53Zpost119285: Re: io-net migrating nicinfo
http://community.qnx.com/sf/go/post119285
Hello All,
Need information on alternative of /dev/io-net/en0 in io-pkt.
Please suggest how to execute ioctls like SIOCSDRVSPEC (Since there will be no device node when using io-pkt drivers)bhavya ramu(deleted)2018-11-14T14:52:36Zpost119284: Re: RE: Get MAC with io-pkt
http://community.qnx.com/sf/go/post119284
Hello All,
I checked links given above, but itseems to be not available.
Please suggest how to get mac address with io-pkt for "fec0" interface. Thanks.bhavya ramu(deleted)2018-11-14T09:32:49Zpost118960: Ethernet over USB using RNDIS on x86
http://community.qnx.com/sf/go/post118960
Hi
I'm new so I hope I'm posting in the right place... if not feel free to move this post.
I have an x86 target which is acting as a USB host to communicate with a USB device using RNDIS. I'm using QNX 6.6. I'm attempting the following:
io-pkt-v4-hc verbose -p tcpip
io-usb-dcd -dehci -duhci -dohci
waitfor /dev/io-usb-dcd/io-usb 5
mount -Tio-pkt -o mac=00D056F2B512,usbdnet_mac=00D056F2B513,protocol=rndis devnp-usbdnet.so
if_up -p rndis0
ifconfig rndis0 10.100.8.113
what I see is to the following:
# sloginfo -c
Time Sev Major Minor Args
Jul 16 15:51:19 5 14 0 tcpip starting
Jul 16 15:51:19 3 14 0 Using pseudo random generator. See "random" option
Jul 16 15:51:19 5 14 0 initializing IPsec... done
Jul 16 15:51:19 5 14 0 IPsec: Initialized Security Association Processing.
Jul 16 15:51:19 2 10 0 usbmgr_connection_create() Failed to attach to root device for cfg (status = 19)
Jul 16 15:51:19 2 10 0 usbdif_init() Couln't create configuration connection to the usb stack... using default descriptors ( error = 19 )
Jul 16 15:51:19 5 14 0 rndis0
Questions:
1) The usbdnet_mac is incorrect. How do I display the MAC address of the local USB port in QNX? I will try to see if I can give it when I attached the device to Windows.
2) Does anyone have a suggestion of usbmgr_connection_create() is failing to attach?
The "usb -v" dump is attached.Tim Spargo2018-07-17T00:15:17Zpost118146: How do i determine Ethertype in PFIL filter
http://community.qnx.com/sf/go/post118146
Hi,
I replacing an io-net filter with a PFIL filter. Previously we would look at the Ethertype field to determine the filter action. This was to support filtering of IEC GOOSE message which use their own Ethernet frame types. I'm struggling to determine how I can get to the same field in the PFIL interface. The mbuf data starts at the payload which is too far in the frame. Is the Ethertype available somewhere else in the mbuf chain?
I've included io-net code snippet for info:-
int goose_rx_up(
npkt_t *npkt,
void *func_hdl,
int off,
int framlen_sub,
uint16_t cell, // 1 = "en"
uint16_t endpoint, // endpoint gives us the originating ethernet port; 0=en0, 1=en1
uint16_t iface
)
{
net_buf_t *buf;
net_iov_t *iov;
buf = TAILQ_FIRST(&npkt->buffers);
iov = buf->net_iov;
// check to see if this is a ETHERTYPE_VLAN goose message; if so, filter it away to the goose app if connected
ptr16 = (uint16_t *)(iov->iov_base);
/*
* Check for ether VLAN 0x8100 AND goose type 0x88b8 or goose type 0x88b9 or Goose Types on their own...
*/
if ( ( ptr16[ETH_VLAN_WORD_POS] == ETH_TYPE_IEC61850_GOOSE ) || ( ptr16[ETH_VLAN_WORD_POS] == ETH_TYPE_IEC61850_GSE_MGMNT )
|| ( ptr16[ETH_VLAN_WORD_POS] == ETHERTYPE_VLAN && (ptr16[ETH_GOOSE_TYPE_WORD_POS] == ETH_TYPE_IEC61850_GOOSE || ptr16[ETH_GOOSE_TYPE_WORD_POS] == ETH_TYPE_IEC61850_GSE_MGMNT) ) )
{
#ifdef DEBUG
fprintf(stderr, "Incoming subscriber goose msg rxd, len=%d\n", npkt->framelen);
#endif
}
}Jasver Singh(deleted)2017-10-24T14:28:53Zpost117943: Adding / deleting permanent entries in NDP
http://community.qnx.com/sf/go/post117943
Hello,
I need to add/delete a permanent entry to ndp table in QNX.
I found a way to add entry to ndp table in linux using the following command
"ip -6 neigh add <IPv6 address> lladdr <link-layer address> dev <device>"
Can u please suggest me an alternative command for adding / deleting the permanent entry to ndp table in QNX
Thanks,
Jashithajashitha kp(deleted)2017-08-04T06:30:00Zpost115955: Unable to load devn driver in io-pkt
http://community.qnx.com/sf/go/post115955
Hi,
I have a devn driver written for io-net which I'm trying to mount for io-pkt. I'm executing the command:
mount -v -T io-pkt -omac=001122334455 /tmp/devn-znet.so
But I get the error:
Parsed: mount from [/tmp/devn-znet.so] mount on [NULL] type [io-pkt]
mount: Can't mount / (type io-pkt)
mount: Possible reason: No such device or address
In sloginfo, I see:
Time Sev Major Minor Args
Mar 15 20:14:52 4 4 0 ksh: /sbin/mount(-v,-T,io-pkt,-omac=001122334455,/tmp/devn-znet.so)
Mar 15 20:14:52 2 14 0 Unable to load /tmp/devn-znet.so: (null)
"ls -l /tmp/devn-znet.so" gives:
-rwxrwxrwx 1 root root 36687 Mar 15 20:11 /tmp/devn-znet.so
"pidin -pio-pkt-v6-hc mem" gives:
pid tid name prio STATE code data stack
4784153 1 sbin/io-pkt-v6-hc 21r SIGWAITINFO 2300K 2808K 8192(516K)*
4784153 2 sbin/io-pkt-v6-hc 10r RECEIVE 2300K 2808K 8192(132K)
4784153 3 sbin/io-pkt-v6-hc 21r RECEIVE 2300K 2808K 4096(132K)
4784153 4 sbin/io-pkt-v6-hc 10r RECEIVE 2300K 2808K 4096(132K)
libc.so.3 @fe300000 512K 12K
devnp-shim.so @fe386000 44K 4096
devn-mpc85xx.so @fe392000 52K 4096
/dev/mem @80100000 (f7024000) 4096
/dev/mem @80101000 (f7024000) 4096
/dev/mem @80102000 (f7026000) 4096
/dev/mem @80103000 (f7024000) 4096
How can I debug further?
Any help would be much appreciated. Thanks.
Tarun.Tarun R(deleted)2016-03-15T11:57:32Zpost105896: Intel platform native io-pkt driver, but nicinfo refers to /dev/io-net/en0
http://community.qnx.com/sf/go/post105896
Hi
I'm seeing an issue with nicinfo on QNX 6.5.0 SDP with a native io-pkt driver.
nicinfo reports "/dev/io-net/en0 no such file or directory"
Any idea on why nicinfo tries to see the io-net path even though the
driver is native io-pkt.
Thanks in advacne.
-CTChris Tucker2013-10-14T02:45:35Zpost102144: io-net migrating nicinfo
http://community.qnx.com/sf/go/post102144
Hi,
I need a replacement of accessing /dev/io-net/en0 in io-pkt-v4
I use it like below
nicFD = open( "/dev/io-net/en0", O_ACCMODE );
If there any api in io-pkt which can return me a file descriptor for any desired interfacenishant mishra2013-06-11T11:32:54Zpost91673: Re: io-pkt & Multicasting
http://community.qnx.com/sf/go/post91673
Looked into io-pkt-v4-hc ?
----- Original Message -----
From: antony Lewis [mailto:community-noreply@qnx.com]
Sent: Monday, February 20, 2012 09:47 AM
To: ionetmig-networking <post91671@community.qnx.com>
Subject: io-pkt & Multicasting
Dear Friends
According to QNX docs, io-pkt-v4 doesn't support Multicast routing. (http://www.qnx.com/developers/docs/6.4.1/neutrino/utilities/i/io-pkt.html)
What is the alternative for io-pkt-v4 to have Multicast routing ?
Regards
_______________________________________________
io-net migration
http://community.qnx.com/sf/go/post91671Mate Szarvas2012-02-20T16:51:58Zpost91671: io-pkt & Multicasting
http://community.qnx.com/sf/go/post91671
Dear Friends
According to QNX docs, io-pkt-v4 doesn't support Multicast routing. (http://www.qnx.com/developers/docs/6.4.1/neutrino/utilities/i/io-pkt.html)
What is the alternative for io-pkt-v4 to have Multicast routing ?
Regardsantony Lewis2012-02-20T14:47:45Zpost86507: devn-mpc-85xx
http://community.qnx.com/sf/go/post86507
Hello.
I have a core dump while trying to use the devn-mpc85xx.so with io-pkt :
#
#
# io-pkt-v4-hc -dmpc85xx -v
Memory fault (core dumped)
# ls -l /proc/boot/devn*
-rwxrwxrwx 1 root 0 57344 Nov 28 2008 /proc/boot/devn-mpc85xx.so
-rwxrwxrwx 1 root 0 39161 May 20 2009 /proc/boot/devnp-shim.so
# sloginfo -c
Time Sev Major Minor Args
Apr 07 08:14:08 5 14 0 tcpip starting
Apr 07 08:14:08 5 17 0 io_open for id = 10005
Apr 07 08:14:08 3 14 0 Using pseudo random generator. See "random" option
Apr 07 08:14:08 5 14 0 initializing IPsec... done
Apr 07 08:14:08 5 14 0 IPsec: Initialized Security Association Processing.
Apr 07 08:14:08 5 17 0 io_close_ocb
#
# io-pkt-v4-hc
# pidin a
pid Arguments
1 procnto-booke-instr
2 devc-ser8250-mpc8540 -e -c396000000 -b 115200 0xf0004500,26
3 slogger
4 pipe
5 pci-men_em3fam -B -vvvv
6 smb-men_em03
20487 devc-pty
20488 qconn
20490 inetd
32777 sh
32779 mdis_kernel_dbg
208908 io-pkt-v4-hc
213005 pidin a
# mount -T io-pkt /proc/boot/devn-mpc85xx.so
mount: Can't mount / (type io-pkt)
mount: Possible reason: No such process
# pidin a
pid Arguments
1 procnto-booke-instr
2 devc-ser8250-mpc8540 -e -c396000000 -b 115200 0xf0004500,26
3 slogger
4 pipe
5 pci-men_em3fam -B -vvvv
6 smb-men_em03
20487 devc-pty
20488 qconn
20490 inetd
32777 sh
32779 mdis_kernel_dbg
245772 pidin a
#
is that normal ?
Why ?Guillaume Varlet2011-06-08T13:59:31Zpost83049: Re: RE: LSM name shown by pidin
http://community.qnx.com/sf/go/post83049
Has there been any progress toward fixing this "buglet", #PR43050. The problem still exists in 6.50, and is causing us a bit of grief.
MurfJohn Murphy2011-02-09T19:49:43Zpost78785: Re: mbuf Memory Management in pfil Hook
http://community.qnx.com/sf/go/post78785
Hi Mark:
Looks like the NetBSD man pages have a bit more information:
http://netbsd.gw.com/cgi-bin/man-cgi?pfil_add_hook++NetBSD-4.0
Note the line:
"If the packet processing is to stop, it is the responsibility of the filter to free the packet." (and, conversely, if you don't block the packet, you don't free it since it has to continue on up the stack).
Not 100% sure about the outgoing stage, but given that the filter has no way of knowing when the driver has consumed the packet, I'd say that the driver doing the free would be the only way that makes sense.
Hope that helps,
Robert.Robert craig2010-12-15T05:15:07Zpost74738: mbuf Memory Management in pfil Hook
http://community.qnx.com/sf/go/post74738
I've read the Filtering Wiki and the io-net migration guide and despite the note in these references saying there are many places on the web with information about mbuf's, I haven't been able to find anything about mbuf memory management in hooks. In our case, we have a protocol running above Ethernet. We register a PFIL_IN hook to collect packets off the wire. From the filtering wiki, it looks like our hook routine should return a non-zero value if we consume a packet and zero if packet processing should continue. It would make sense that we are responsible for freeing an mbuf if we consume a packet. Is that true? Similarly, we should not free the mbuf if our input hook returns 0, correct?
On the send side, we allocate an mbuf and call if_output to send the packet. Are we correct in assuming the driver will free this outgoing mbuf when it is no longer needed? We currently free the mbuf if if_output returns a non-zero value. Is that correct? Thanks.
MarkMark Dowdy(deleted)2010-11-15T23:57:26Zpost65836: about networking on QNX6?
http://community.qnx.com/sf/go/post65836
hi ,all:
I am working on a BSP AT91SAM9263.now,i have to make the target connect with IDE,But I have no idea of how to do.can anyone give some suggestions or tell me where I can find the reference about the network.
thank.
best regard!
yang.yang hui2010-09-03T09:04:41Zpost60286: Multiple Interfaces in QNX 6.4.1
http://community.qnx.com/sf/go/post60286
Hi,
We have a computer with 2 voards.
1 of the CPU connects to the network using DHCP and it also connects to the other CPU using Serial over TCP communication.
I am porting this project from 6.3.1.
The earlier code was:
The earlier code for having the network up for the CC project(Lower Board) was:
io-net -dspeedo -dfd fd=/dev/ser1,mac=000102030405,ahdlc -ptcpip
ifconfig en1 1.1.1.1 netmask 255.255.255.252
For the MC project (Upper Board) it was:
io-net -dspeedo -dfd fd=/dev/ser1,mac=000102030406,ahdlc -ptcpip
ifconfig en1 1.1.1.2 netmask 255.255.255.252
As we can see that there were two interfaces en0 and en1.
Since we connect the lower board’s Ethernet port to the network so the lower board was getting 2 IP’s for 2 different interfaces.
The interface en1 of the lower board was used to communicate with the upper board and the interface en0 was used to communicate with the network.
But i dont know how can we have multiple interfaces in QNX 6.4.1.
I could not see an appropriate answer when I searched through web
Please Help.Raj Vardhan2010-07-22T14:33:13Zpost58860: io-net traces/code
http://community.qnx.com/sf/go/post58860
HI
I need to have a look into io-net's mind somehow!!
Can i access its source code somewhere?
Or is there a way to get traces out of io-net? I tried -v option while loading io-net but that does not show anything in sloginfo...
Regards
VineetVineet Garg2010-07-07T17:57:37Zpost57146: RE: Not Able to Start the Network
http://community.qnx.com/sf/go/post57146
> we changed the computer ... worked perfectly fine
Sometimes when this happens, the problem might be with the
interrupt not firing for some reason. I haven't seen any
"nicinfo" or "ifconfig -v" output but a malfunctioning
interrupt looks like:
1) link is ok
2) packets are transmitted
3) no packets are received
Just a shot in the dark.
P.S. I really hate shared interrupts. Not as much as a trip to
the dentist, but they're still pretty evil:
http://community.qnx.com/sf/wiki/do/viewPage/projects.networking/wiki/Dr
ivers_wiki_page
-- cut --
Shared Interrupts - Problems?
Different devices sharing a hardware interrupt is kind of a neat idea,
but unless you really need to do it - because you've run out of hardware
interrupt lines - it generally doesn't help you much. In fact, it can
cause you trouble. For example, if your driver doesn't work - e.g. no
received packets - check and see if it is sharing an interrupt with
another device, and if so, re-configure your board so it does not.
Most of the times, when shared interrupts are configured, there is no
good reason for it - i.e. you haven't really run out of interrupts - and
this can decrease your performance, because when the interrupt fires,
ALL of the devices sharing the interrupt need to run and check and see
if it is for them. If you check the source, you can see that some
drivers do the "right thing" which is to read registers in their
interrupt handlers to see if the interrupt is really for them, and
ignore it if not. But many, many drivers do not - they schedule their
thread-level event handlers to check their hardware, which is
inefficient and reduces performance. If you are using PCI bus, use the
"pci -v" utility to check interrupt allocation. You may be surprised as
to what you see. Another point worth making is that sharing interrupts
can vastly increase interrupt latency, depending upon exactly what each
of the drivers do. Remember that after an interrupt fires, it will NOT
be re-enabled by the kernel until ALL driver handlers tell the kernel
that they have completed handling. So, if one driver takes a long, long
time servicing a shared interrupt which is masked, if another device on
the same interrupt causes an interrupt during that time period,
processing of that interrupt can be delayed for an unknown duration of
time. Bottom line is that interrupt sharing can cause problems, and
reduce performance, increase cpu consumption, and seriously increase
latency. Unless you really need to do it, don't. If you must share
interrupts, make sure your drivers are doing the "right thing". Face it
- shared interrupts are the new "trans fats" :)
-- cut --
--
aboyd www.pittspecials.com/movies/headon.wmvAndrew Boyd(deleted)2010-06-18T13:14:35Zpost57132: Re: Not Able to Start the Network
http://community.qnx.com/sf/go/post57132
Today we changed the computer and tried running our code in it. The code worked perfectly fine and an IP address got assigned to the computer. We were able to ping other systems on the network.
But the computer on which we were testing earlier is still not able get an IP address. Please note that the images created on QNX 6.3.2 is working on both the computer.
I tried checking the SLOGGER file on both the computer.
SLOGGER result on first controller (On which the CONFIGDEBUG on QNX 6.4.1 is working fine):
Time Sev Major Minor Args
Jun18 12:32:26 5 14 0 tcpip starting
Jun18 12:32:26 5 14 0 Using pseudo random generator. See “random” option
Jun18 12:32:27 5 14 0 Intel 82557
Jun18 12:32:27 5 14 0 Vendor …………………………..0x8086
Jun18 12:32:27 5 14 0 Device …………………………..0x1209
Jun18 12:32:27 5 14 0 Revision …………………………..0x10
Jun18 12:32:27 5 14 0 I/O port base …………………………..0x1000
Jun18 12:32:27 5 14 0 Memory base …………………………..0xfcc20000
Jun18 12:32:27 5 14 0 Interrupt …………………………..0xb
Jun18 12:32:27 5 14 0 MAC address …………………………..00e04b 0eb169
Jun18 12:33:00 5 14 0 devn-speedo: MII transceiver found at address.
Jun18 12:33:02 5 14 0 devn-speedo: MII transceiver found at address.
Jun18 12:33:02 5 14 0 devn-speedo: link up (100 base T Full Duplex)
Jun18 12:33:05 2 14 0 devn-speedo: speedo_MDI_MonitorPhy():Calling DI_monitorPhy()
While the SLOGGER file on the earlier computer says:
Time Sev Major Minor Args
Jun11 13:32:26 5 14 0 tcpip starting
Jun11 13:32:26 5 14 0 Using pseudo random generator. See “random” option
Jun11 13:32:27 5 14 0 Unknown Chip ID
Jun11 13:32:27 5 14 0 Vendor …………………………..0x8086
Jun11 13:32:27 5 14 0 Device …………………………..0x1209
Jun11 13:32:27 5 14 0 Revision …………………………..0x10
Jun11 13:32:27 5 14 0 I/O port base …………………………..0x1000
Jun11 13:32:27 5 14 0 Memory base …………………………..0xfcc20000
Jun11 13:32:27 5 14 0 Interrupt …………………………..0xb
Jun11 13:32:27 5 14 0 MAC address …………………………..00e04b 0eb169
Jun11 13:33:00 5 14 0 devn-speedo: MII transceiver found at address.
Jun11 13:33:02 5 14 0 devn-speedo: MII transceiver found at address.
Jun11 13:33:05 2 14 0 devn-speedo: speedo_MDI_MonitorPhy():Calling DI_monitorPhy()
If I query IFCONFIG on the first computer, the result is:
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33192
inet 127.0.0.1 netmask 0xff000000
fxp0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
address: 00:11:22:33:aa:bb
media: Ethernet autoselect (100baseTX full –duplex)
status: active
inet 10.11.148.217 netmask 0xfffffe00 broadcat 255.255.255.255
While the IFCONFIG on the second computer gives this result:
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33192
inet 127.0.0.1 netmask 0xff000000
fxp0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
address: 00:11:22:33:aa:bb
media: Ethernet none
inet 0.0.0.0 netmask 0xff000000 broadcat 255.255.255.255
There might be a problem with the Ethernet card on the earlier computer but why the old code was running properly on that? Do you have an idea on this?Raj Vardhan2010-06-18T10:14:37Zpost57104: Re: Not Able to Start the Network
http://community.qnx.com/sf/go/post57104
Same setup, including same hub and cbles, same hardware, everything the
same... and it works in 6.3.2, but not 6.4.1? Very curious case... :-)
Because there's no light, doesn't that indicate the link isn't
establishing? Can you figure out what media the 6.3.2 negotiated and use
a driver option or ifconfig media to set the same in 6.4.1?
On 10-06-17 05:45 AM, Raj Vardhan wrote:
> There is no light at any of the ends. but there is no problem with cabling because the old code in QNX 6.3.2 is working fine.Patrik Lahti2010-06-17T18:30:52Zpost57052: Re: Not Able to Start the Network
http://community.qnx.com/sf/go/post57052
There is no light at any of the ends. but there is no problem with cabling because the old code in QNX 6.3.2 is working fine.Raj Vardhan2010-06-17T09:45:54Zpost57051: Re: Not Able to Start the Network
http://community.qnx.com/sf/go/post57051
Im connected to a hub.Raj Vardhan2010-06-17T09:44:52Zpost56958: Re: Not Able to Start the Network
http://community.qnx.com/sf/go/post56958
What are you connected to? A hub? A switch? A router? Another PC?
Do you see the lights go on on both ends?
On 10-06-16 05:31 AM, Raj Vardhan wrote:
> Ya i have checked the cabling and all. Everything of fine.Patrik Lahti2010-06-16T13:39:57Zpost56935: Re: Not Able to Start the Network
http://community.qnx.com/sf/go/post56935
Ya i have checked the cabling and all. Everything of fine.
My Network card details are:
CLASS =Network(Ethernet)
Vendor ID = 8086h , Intel Corporation
1209h, 8255xER/82551IT Fast Ethernet Controller
PCI index = 0h
PCI Mem Address = fcc20000h enabled
PCI I0 Address = 1000h enabled
PCI Mem Address = fcc 00000h enabled
PCI Expansion ROM 0h disaled
PCI Int Pin =INT A
Interrupt Line =11
CPU Inetrrupt = bh
I am using a dvnp-speedo driver? Is it correct or do i have to use devnp-e1000 driverRaj Vardhan2010-06-16T09:30:59Zpost56853: Re: Not Able to Start the Network
http://community.qnx.com/sf/go/post56853
So you're having a problem that the interface doesn't come up.
Have you checked the cabling?
What are you connected to?
Are you using a cross-over cable?
/P
On 10-06-15 10:21 AM, Raj Vardhan wrote:
> No.. I am not able to see any traffic using tcpdump.Patrik Lahti2010-06-15T14:27:12Zpost56850: Re: Not Able to Start the Network
http://community.qnx.com/sf/go/post56850
No.. I am not able to see any traffic using tcpdump.Raj Vardhan2010-06-15T14:21:30Zpost56839: Re: Not Able to Start the Network
http://community.qnx.com/sf/go/post56839
> We are working on the porting of io-net driver. The earlier code used io-net
> and but since io-net is not available in QNX 6.4.1 we are using io-pkt.
>
> To start io-pkt we ran this command:
>
> io-pkt-v4-hc -d /lib/dll/devnp-speedo.so -p tcpip
>
> The above command ran without any error.
> At This point I Checked the IFCONFIG I got the following result:
>
> lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33192
> inet 127.0.0.1 netmask 0xff000000
> fxp0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
> address: 00:11:22:33:aa:bb
> media: Ethernet autoselct(none full-duplex)
> status:active
>
> Then I ran the dhcp.client
> dhcp.client
>
> Then I tried checking the IP address of the machine by typing IFCONFIG in the
> prompt.The output was:
>
> lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33192
> inet 127.0.0.1 netmask 0xff000000
> fxp0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
> address: 00:11:22:33:aa:bb
> media: Ethernet none
> inet 0.0.0.0 netmask 0xff000000 broadcat 255.255.255.255
>
> I then ran q conn in the prompt.
> QCONN
>
> Still I got the same result for IFCONFIG
>
> lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33192
> inet 127.0.0.1 netmask 0xff000000
> fxp0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
> address: 00:11:22:33:aa:bb
> media: Ethernet none
> inet 0.0.0.0 netmask 0xff000000 broadcat 255.255.255.255
>
> I even tried setting the IP address by running the command
> IFCONFIG FXP0 <ip address>
>
> An IP address gets assigned but media remains none and I m still not able to
> ping any other computer in the network.
> Please help
fxp0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
address: 00:11:22:33:aa:bb
media: Ethernet none
inet 0.0.0.0 netmask 0xff000000 broadcat 255.255.255.255
interface is not up even:(Yao Zhao(deleted)2010-06-15T13:29:30Zpost56838: Re: Not Able to Start the Network
http://community.qnx.com/sf/go/post56838
Do you see any traffic using tcpdump?
/PPatrik Lahti2010-06-15T13:25:17Zpost56824: Not Able to Start the Network
http://community.qnx.com/sf/go/post56824
We are working on the porting of io-net driver. The earlier code used io-net and but since io-net is not available in QNX 6.4.1 we are using io-pkt.
To start io-pkt we ran this command:
io-pkt-v4-hc -d /lib/dll/devnp-speedo.so -p tcpip
The above command ran without any error.
At This point I Checked the IFCONFIG I got the following result:
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33192
inet 127.0.0.1 netmask 0xff000000
fxp0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
address: 00:11:22:33:aa:bb
media: Ethernet autoselct(none full-duplex)
status:active
Then I ran the dhcp.client
dhcp.client
Then I tried checking the IP address of the machine by typing IFCONFIG in the prompt.The output was:
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33192
inet 127.0.0.1 netmask 0xff000000
fxp0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
address: 00:11:22:33:aa:bb
media: Ethernet none
inet 0.0.0.0 netmask 0xff000000 broadcat 255.255.255.255
I then ran q conn in the prompt.
QCONN
Still I got the same result for IFCONFIG
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33192
inet 127.0.0.1 netmask 0xff000000
fxp0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
address: 00:11:22:33:aa:bb
media: Ethernet none
inet 0.0.0.0 netmask 0xff000000 broadcat 255.255.255.255
I even tried setting the IP address by running the command
IFCONFIG FXP0 <ip address>
An IP address gets assigned but media remains none and I m still not able to ping any other computer in the network.
Please helpRaj Vardhan2010-06-15T10:20:59Zpost52339: Re: problem with asix usb-ethernet
http://community.qnx.com/sf/go/post52339
first "usb" should show the asix usb, if no then io-pkt won't drive it.Yao Zhao(deleted)2010-04-21T22:27:07Zpost52316: Re: problem with asix usb-ethernet
http://community.qnx.com/sf/go/post52316
Try looking at 'sloginfo' for more clues. And 'pidin mem' will tell you
if the driver is succesfully loaded in io-pkt or not.
/PPatrik Lahti2010-04-21T19:53:40Zpost52304: problem with asix usb-ethernet
http://community.qnx.com/sf/go/post52304
Hi
I have installed QNX in a Beagle board. I have a usb-ethernet dongle (Linksys ASIX AX88772 USB2.0 to Fast Ethernet Adapter). However, I could not make it work.
When I run io-pkt-v4 -dasix, I see it's running via pidin.
69646 1 roc/boot/io-pkt-v4 21r SIGWAITINFO
69646 2 roc/boot/io-pkt-v4 21r RECEIVE 1
69646 3 roc/boot/io-pkt-v4 21r REPLY 12295
when I run usb, it does not show asix:
# usb
USB 0 (EHCI) v1.10, v1.01 DDK, v1.01 HCD
USB 1 (MENTOR) v1.10, v1.01 DDK, v1.01 HCD
ifconfig gives me:
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33192
inet 127.0.0.1 netmask 0xff000000
When I tried to add an ip address to en0, i get
# ifconfig en0 192.168.1.130
ifconfig: SIOCGIFFLAGS en0: No such device or address
Can someone help me out?
Thanks
--AhsanAhsan Habib2010-04-21T19:19:44Zpost49400: RE: Converting io-net filter to pfil hook
http://community.qnx.com/sf/go/post49400
The pci manager only allows a device to be attached to once. If the
first stack has a driver handling a particular nic the second instance
of the driver in the second stack will fail.
Regards,
-seanb
-----Original Message-----
From: Mark Dowdy [mailto:community-noreply@qnx.com]
Sent: Fri 3/12/2010 7:06 PM
To: ionetmig-networking
Subject: Re: Converting io-net filter to pfil hook
Thanks for the LD_LIBRARY_PATH key. That was the missing piece. If we slay io-pkt and restart it after we've included the path to our binaries in LD_LIBRARY_PATH, we are able to mount our hook. We'll likely head down that path instead of wrestling with the second instance of io-pkt.
FWIW, here's what we see when we try to start the second instance of io-pkt.
# io-pkt-v4 -i1 -ptcpip prefix=/alt
# SOCK=/alt ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33192
inet 127.0.0.1 netmask 0xff000000
# mount -Tio-pkt1 /lib/dll/devnp-e1000.so
mount: Can't mount / (type io-pkt1)
mount: Possible reason: No such device
When we run sloginfo, we see an entry that contains
'Unable to init /lib/dll/devnp-e1000.so : No such device
_______________________________________________
io-net migration
http://community.qnx.com/sf/go/post49399Sean Boudreau(deleted)2010-03-13T00:42:16Zpost49399: Re: Converting io-net filter to pfil hook
http://community.qnx.com/sf/go/post49399
Thanks for the LD_LIBRARY_PATH key. That was the missing piece. If we slay io-pkt and restart it after we've included the path to our binaries in LD_LIBRARY_PATH, we are able to mount our hook. We'll likely head down that path instead of wrestling with the second instance of io-pkt.
FWIW, here's what we see when we try to start the second instance of io-pkt.
# io-pkt-v4 -i1 -ptcpip prefix=/alt
# SOCK=/alt ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33192
inet 127.0.0.1 netmask 0xff000000
# mount -Tio-pkt1 /lib/dll/devnp-e1000.so
mount: Can't mount / (type io-pkt1)
mount: Possible reason: No such device
When we run sloginfo, we see an entry that contains
'Unable to init /lib/dll/devnp-e1000.so : No such deviceMark Dowdy(deleted)2010-03-13T00:06:00Zpost49388: Re: Converting io-net filter to pfil hook
http://community.qnx.com/sf/go/post49388
On Fri, Mar 12, 2010 at 03:31:08PM -0500, Mark Dowdy wrote:
> We are attempting to migrate an io-net filter to an io-pkt pfil hook.
> Thus far, we've only had limited success. When we try to mount our hook,
> we end up with quite a few undefined symbols. These symbols are defined
> in shared libraries that we build from our sources and then link into
> the hook. The LD_LIBRARY_PATH variable is set to the location of the
> required shared object files. Unfortunately, mount can't seem to find
> them. Is there some other way to specify where mount should look for
> shared libraries or is shared library use by LSM's just not supported?
You need to set LD_LIBRARY path on io-pkt, not mount.
>
>
>
> The answer to the question above seems be "LSM's can load shared
> modules" because when we tried starting a second instance of io-pkt we
> were able to mount our pfil hook. Unfortunately, the second instance of
> io-pkt didn't have any interfaces. Additionally, starting the second
> instance of io-pkt seems to kill the existing, working interfaces (i.e.
> we can no longer telnet into the box, ifconfig only lists lo0). So,
> mounting our hook onto a second io-pkt instance doesn't do us much good
> because there are no interfaces for data. When we try to mount a driver
> onto the second io-pkt instance, the mount fails (Can't mount / (type
> io-pkt2)). We tried creating the second instance of io-pkt because we
> were using a second instance of io-net for our filter. Having two
> instances of the stack probably doesn't make much sense because we want
> to attach our hook to one interface on an Intel 82563 dual interface
> NIC.
Check out the io-pkt docs for the options that control
targeting multiple stacks. In particular
# io-pkt -i1 -ptcpip prefix=/alt ...
# mount -T io-pkt1 ...
# SOCK=/alt ifconfig
Regards,
-seanbSean Boudreau(deleted)2010-03-12T20:37:51Zpost49387: Converting io-net filter to pfil hook
http://community.qnx.com/sf/go/post49387
We are attempting to migrate an io-net filter to an io-pkt pfil hook.
Thus far, we've only had limited success. When we try to mount our hook,
we end up with quite a few undefined symbols. These symbols are defined
in shared libraries that we build from our sources and then link into
the hook. The LD_LIBRARY_PATH variable is set to the location of the
required shared object files. Unfortunately, mount can't seem to find
them. Is there some other way to specify where mount should look for
shared libraries or is shared library use by LSM's just not supported?
The answer to the question above seems be "LSM's can load shared
modules" because when we tried starting a second instance of io-pkt we
were able to mount our pfil hook. Unfortunately, the second instance of
io-pkt didn't have any interfaces. Additionally, starting the second
instance of io-pkt seems to kill the existing, working interfaces (i.e.
we can no longer telnet into the box, ifconfig only lists lo0). So,
mounting our hook onto a second io-pkt instance doesn't do us much good
because there are no interfaces for data. When we try to mount a driver
onto the second io-pkt instance, the mount fails (Can't mount / (type
io-pkt2)). We tried creating the second instance of io-pkt because we
were using a second instance of io-net for our filter. Having two
instances of the stack probably doesn't make much sense because we want
to attach our hook to one interface on an Intel 82563 dual interface
NIC.
Any ideas on what we're missing would be appreciated?
MarkMark Dowdy(deleted)2010-03-12T20:31:07Zpost45694: PFIL_IN & PFIL_OUT
http://community.qnx.com/sf/go/post45694
Hi Forum,
One more question regarding the PFIL_IN and PFIL_OUT usage.
As I mentioned in other questions. I have the below described problem to which I am writing the solution using pfil hook in io-pkt
Machine X and Machine Y are on the private network. Machine X is master and Machine Y is slave. All the startup code to detect master and slave is in place and this code is proven.
Now the question is slave sends some data packets to master. And master reads those data packets and master in turn will send other data and slave will read it. Its a full duplex communication on different ports of the machines. Master and slave have more than 2 ports.
My design idea using PFIL
Machine X will create an input hook to the stack using PFIL_IN so that it can read all the stack data. After the data read on the stack from Machine Y, the Machine X will send some data to Machine Y using mbuf and "if_output()" call which is on ifnet struct.
Machine Y will also create an input hook to the stack using PFIL_IN. It will also read the stack to read the data from Machine X. Machine Y will also use mbuf and "if_output()" call on ifnet struct to send data to Machine X.
In this 2 way communication while creating the hook I want to use
struct pfil_head *pfh_inet;
pfh_inet = pfil_head_get(FIL_TYPE_AF, AF_INET)
pfil_add_hook(My_hook, NULL, PFIL_IN|PFIL_WAITOK, pfh_inet);
Will this work for my problem described above or
do I have to use the below one.
struct pfil_head *pfh_inet;
pfh_inet = pfil_head_get(FIL_TYPE_IFNET, 0)
pfil_add_hook(My_hook, NULL, PFIL_IFNET, pfh_inet);
Thanks
VinodVinod Kolapuram2010-01-21T18:46:39Zpost45686: nw_pthread_create() & iov_t doubts.
http://community.qnx.com/sf/go/post45686
Hi Forum,
I am new to QNX and basically porting from io-net to io-pkt.
I will be using nw_pthread_create() , I was looking at some implementations as suggested by the website for porting and I see that there is a init function as 6th argument, where wtp is intialized and on it "wtp->quiesce_callout" is called for a user specific function which basically will call "MsgSendPulse()".
Is it a must to have a init_function. What if I put all NULLs to the extra last 3 arugments in nw_pthread_create()? Will it work?
And I have a question regarding the iov_t.
The existing implementation for io-net was done using iov now I am trying to port to io-pkt. Do I need to use iov or just copy the address of my data location to mbuf to send it across to other machine using "if_output()" funtion available on ifnet struct.
I am thinking if_output() function will take care of sending it in its own format and on the other end when mbuf is received I will have
a "PFIL_IN" hook which gets the mbuf content.
The below is the structs of iov on io-net.h file
typedef struct _net_iovec net_iov_t;
struct _net_iovec {
void *iov_base;
paddr_t iov_phys;
size_t iov_len;
};
typedef struct _net_buf net_buf_t;
struct _net_buf {
TAILQ_ENTRY(_net_buf) ptrs;
int niov;
net_iov_t *net_iov;
};
I also see that in io-net implementation at some point we need to insert net_buf in "_npkt" struct as described below. I have just copied some code line below from my io-net implementation.
/* Insert net_buf in npkt */
TAILQ_INSERT_HEAD(&npkt->buffers, nb, ptrs);
/* Setup iov, it lives right after the net_buf */
iov = (net_iov_t *)(nb + 1);
nb->niov = 1;
nb->net_iov = iov;
iov->iov_base = (char *)ptr; /* Iov points to data buffer */
/* Align it */
if (((int) iov->iov_base) % 4) {
(char *)iov->iov_base += 3;
iov->iov_base = (char *)((int)iov->iov_base & ~3);
}
iov->iov_len = HM_TOTAL_PACKET_SZ;
iov->iov_phys = (paddr_t)(pfilter_ctrl->npi->mphys(iov->iov_base));
npkt->org_data = ptr;
npkt->next = NULL;
npkt->tot_iov = 1;
return npkt;
For "io-pkt" implementation I have the iov_t on the nw_stk_ctl struct in nw_datastruct.h .
Is it a must to use iov to send and receive data.
Thanks
VinodVinod Kolapuram2010-01-21T18:03:16Zpost45604: Re: allocating memory for mbuf
http://community.qnx.com/sf/go/post45604
Hi Sean,
I will be using nw_pthread_create() , I was looking at some implementations as suggested by the website for porting and I see that there is a init function as 6th argument, where
wtp is intialized and on it "wtp->quiesce_callout" is called for a user specific function which basically will call "MsgSendPulse().
Is it a must to have a init function. What if I put all NULLs to the extra last 3 arugments in nw_pthread_create()?
And I have a question regarding the iov_t.
The existing implementation for io-net was done using iov now I am trying to port to io-pkt. Do I need to use iov or just copy the address of my data to mbuf to send it across to other machine using "if_output()" funtion available on ifnet struct.
I am thinking mbuf will take care of sending it in its own format and on the other end when mbuf is received I will have a "PFIL_IN" hook which gets the mbuf content.
The below is the structs of iov on io-net.h file
typedef struct _net_iovec net_iov_t;
struct _net_iovec {
void *iov_base;
paddr_t iov_phys;
size_t iov_len;
};
typedef struct _net_buf net_buf_t;
struct _net_buf {
TAILQ_ENTRY(_net_buf) ptrs;
int niov;
net_iov_t *net_iov;
};
For "io-pkt" implementation I have the iov_t on the nw_stk_ctl struct in nw_datastruct.h .
I am new to QNX, is it a must to use iov to send and receive data.
Thanks
VinodVinod Kolapuram2010-01-21T00:39:03Zpost45522: Re: allocating memory for mbuf
http://community.qnx.com/sf/go/post45522
On Tue, Jan 19, 2010 at 08:28:16PM -0500, Vinod Kolapuram wrote:
> Hi ,
> 1. Do we neet to just use malloc to allocate memory for mbuf? In io-net there are inbuilt functions on io-net structure for allocation and free.
No, malloc doesn't provide memory that is safe for packet buffers, use
m_get(), m_gethdr() or m_getcl(). For 512 bytes you'll probably need
a cluster.
>
> 2. Since io-net is not available now for 6.4.0 and above, we don't have to use iov which was part of io-net for porting to io-pkt right?
This is vague. There's various iovs in both io-net and io-pkt.
>
> 3. At the porting point where I am right now makes me feel, that the _iopkt_self structure usage in io-pkt is very minimal compared to _io_net_self usage in io-net. Even though we are using_iopkt_self struct in the entry function, looks like most of the functionality is for the thread handling.
>
> 4. I have around 512 bytes of data to read from stack and do my modification and then put back on stack to send it to other machine. From high level its very simple, but when I looking at the structure usage, its getting more entangled in other complex manipulations. Can any suggest simple steps to achive this using the io-pkt features and functionality.
There's various ways to do this. The most portable would be with
userland sockets.
Regards,
-seanbSean Boudreau(deleted)2010-01-20T03:15:11Zpost45518: allocating memory for mbuf
http://community.qnx.com/sf/go/post45518
Hi ,
1. Do we neet to just use malloc to allocate memory for mbuf? In io-net there are inbuilt functions on io-net structure for allocation and free.
2. Since io-net is not available now for 6.4.0 and above, we don't have to use iov which was part of io-net for porting to io-pkt right?
3. At the porting point where I am right now makes me feel, that the _iopkt_self structure usage in io-pkt is very minimal compared to _io_net_self usage in io-net. Even though we are using_iopkt_self struct in the entry function, looks like most of the functionality is for the thread handling.
4. I have around 512 bytes of data to read from stack and do my modification and then put back on stack to send it to other machine. From high level its very simple, but when I looking at the structure usage, its getting more entangled in other complex manipulations. Can any suggest simple steps to achive this using the io-pkt features and functionality.
Thanks
VinodVinod Kolapuram2010-01-20T01:28:15Zpost45352: Re: Why doesn't the pfil filter module attach to the active ethernet
driver?
http://community.qnx.com/sf/go/post45352
On 14/01/10 03:30 PM, Vinod Kolapuram wrote:
> Hi,
> Isn't the ethernet driver mounted first than the pfil filter module. If that is the case then why doesn't the pfil filter module attach to the active ethernet driver by itself when mounted.
>
I think I wrote it elsewhere too just a few minutes ago, so sorry for
the repetition. Your filter module registers with the stack, not with a
driver directly.
> How can I explicitily attach a pfil filter module to already mounted ethernet driver? If I do it, I get an error saying the resource is busy. And that is what even I was expecting. The ethernet driver is already mounted after startup.
>
I'm not sure what you mean when you say you try explicitly attach a pfil
filter module to an ethernet driver, what commands did you do?
> Is it not true that pfil filter module has to be mounted only after the ethernet driver is loaded. Only then it makes sense for data extraction on the stack.
>
It's not true. The network drivers can be mounted at any time before or
after the packet filter module. Yes, the filter will only get some data
packets once there's at least one network driver mounted so that there
is at least one network interface to get packets from the network.
> Please correct me if I am wrong.
>
> All I want to do is attach my pfil filter module to my devn-i82544.so driver module which is already mounted.
>
This request doesn't make sense, please see above and previous posts.
I'm must assume you want to get packets from network interfaces that
this particular driver is creating?
The example filter module on the wiki
(http://community.qnx.com/sf/wiki/do/viewPage/projects.networking/wiki/Filtering_wiki_page)
will get the input/output_hook() functions invoked with packets
sent/received by the stack. The arguments to this function can be used
to determine where the packets are going to/from etc.
If you're interested in digging deeper into this topic, try printing
some of the contents of the arguments of the hooks and look at other
code that's using the pf API (e.g. nraw and autoip:
http://community.qnx.com/integration/viewvc/viewvc.cgi/trunk/lib/io-pkt/sys/lsm/?root=core_networking&system=exsy1001)
Hope this helps!
/PPatrik Lahti2010-01-15T22:27:45Zpost45350: Re: when does the iface_hook() gets invoked
http://community.qnx.com/sf/go/post45350
On 14/01/10 03:53 PM, Vinod Kolapuram wrote:
> Hi Patrik,
> I have added some log messages on each function of the sample pfil filter code which you are reffering to. I even have one message when the interface is attached or detached.
> My question is, in my case when the pfil filter module is mounted manually with mount command from the shell, by then already the ethernet driver is loaded and available.
>
Yes, the ethernet driver is already loaded an the network interfaces it
creates are already created. Hence when you load the example filter the
stack won't call any PFIL_IFNET hooks for creation of interface since
the interface already exists.
> Do you mean to say the pfil hook interface is attached to the ethernet driver when I mount the pfil filter module
>
> Or
>
> the pfil hook interface is yet to be attached to the driver. If it is yet to be attached, then how do I attach my pfil filter module to the ethernet driver. Only then it makes sense to extract the stack data.
>
The pfil hook interface is to the stack, not the driver. Your example
pfil code is registering hooks with the stack not the driver.
> I just posted one more question please respond to that.
>
Sure, I'll try my best :-)
PS. If you need prompt support then please go through the appropriate
QNX support channels. We're a community here and everyone here makes
every attempt to help on their own time but sometimes there's a lot to
do... :-)
Hope we'll get this cleared out, have a good weekend!
/PPatrik Lahti2010-01-15T22:14:18Zpost45348: Re: when does the iface_hook() gets invoked
http://community.qnx.com/sf/go/post45348
On 14/01/10 05:25 PM, Robert craig wrote:
> Hi Vinod:
>
> I think that the confusion is coming from the fact that the pfil hook attaches itself to the stack (above the driver interface), and not into a driver .
>
Yes, thanks Robert,
I see that it makes sense that this was where the confusion was coming
from...
/PPatrik Lahti2010-01-15T22:03:36Zpost45347: Re: when does the iface_hook() gets invoked
http://community.qnx.com/sf/go/post45347
On 14/01/10 07:26 PM, Vinod Kolapuram wrote:
>> Hi Vinod:
>>
>> I think that the confusion is coming from the fact that the pfil hook attaches
>> itself to the stack (above the driver interface), and not into a driver .
>>
>> The iface hook will get invoked when an ethernet interface is either added
>> into the stack (mounted) or removed from the stack (destroyed). There
>> doesn't have to be any driver interface present when you load in the pfil hook
>> .
>>
> Robert Can you please help me find in QXN boot up sequence as I want to mount my pfil filter module before the ethernet driver is loaded. I think its in some rc files. Please let me know where to change the sequence
>
You're in control of this (at least the parts that are discussed in this
context). You can create your own script inside an image. But I'm
assuming from your earlier questions that you are using a standard PC
install, in which case you have several options, e.g. can change the
enum scripts or slay the stack in rc.local and restart it with the
drivers and lsms in the order you want... The latter is probably easiest.
>> The sample code does something a bit peculiar in that it detaches itself as
>> soon as any interface is destroyed. This was just a convenient mechanism for
>> showing how to remove the pfil hook and not representative of any standard way
>> of operating.
>>
>> The ifacecfg hook will get called if you re-configure any interface (e.g. by
>> bringing any interface up or down).
>>
> Can I reconfigure the ethernet driver devn-i82544.so. I mean its running under io-pkt and I think the driver cannot me unmounted in io-pkt.
>
I don't understand what you're asking, it doesn't make sense.
Reconfigure and unmount are two different things.
/PPatrik Lahti2010-01-15T22:00:55Zpost45268: Re: when does the iface_hook() gets invoked
http://community.qnx.com/sf/go/post45268
> Hi Vinod:
>
> I think that the confusion is coming from the fact that the pfil hook attaches
> itself to the stack (above the driver interface), and not into a driver .
>
> The iface hook will get invoked when an ethernet interface is either added
> into the stack (mounted) or removed from the stack (destroyed). There
> doesn't have to be any driver interface present when you load in the pfil hook
> .
Robert Can you please help me find in QXN boot up sequence as I want to mount my pfil filter module before the ethernet driver is loaded. I think its in some rc files. Please let me know where to change the sequence
>
> The sample code does something a bit peculiar in that it detaches itself as
> soon as any interface is destroyed. This was just a convenient mechanism for
> showing how to remove the pfil hook and not representative of any standard way
> of operating.
>
> The ifacecfg hook will get called if you re-configure any interface (e.g. by
> bringing any interface up or down).
Can I reconfigure the ethernet driver devn-i82544.so. I mean its running under io-pkt and I think the driver cannot me unmounted in io-pkt.
>
> Robert.
Thanks
VinodVinod Kolapuram2010-01-15T00:26:22Zpost45266: Re: when does the iface_hook() gets invoked
http://community.qnx.com/sf/go/post45266
Hi Vinod:
I think that the confusion is coming from the fact that the pfil hook attaches itself to the stack (above the driver interface), and not into a driver .
The iface hook will get invoked when an ethernet interface is either added into the stack (mounted) or removed from the stack (destroyed). There doesn't have to be any driver interface present when you load in the pfil hook.
The sample code does something a bit peculiar in that it detaches itself as soon as any interface is destroyed. This was just a convenient mechanism for showing how to remove the pfil hook and not representative of any standard way of operating.
The ifacecfg hook will get called if you re-configure any interface (e.g. by bringing any interface up or down).
Robert.Robert craig2010-01-14T22:25:05Zpost45258: Re: when does the iface_hook() gets invoked
http://community.qnx.com/sf/go/post45258
Hi Patrik,
I have added some log messages on each function of the sample pfil filter code which you are reffering to. I even have one message when the interface is attached or detached.
My question is, in my case when the pfil filter module is mounted manually with mount command from the shell, by then already the ethernet driver is loaded and available.
Do you mean to say the pfil hook interface is attached to the ethernet driver when I mount the pfil filter module
Or
the pfil hook interface is yet to be attached to the driver. If it is yet to be attached, then how do I attach my pfil filter module to the ethernet driver. Only then it makes sense to extract the stack data.
I just posted one more question please respond to that.
Thanks
VinodVinod Kolapuram2010-01-14T20:53:38Zpost45256: Why doesn't the pfil filter module attach to the active ethernet driver?
http://community.qnx.com/sf/go/post45256
Hi,
Isn't the ethernet driver mounted first than the pfil filter module. If that is the case then why doesn't the pfil filter module attach to the active ethernet driver by itself when mounted.
How can I explicitily attach a pfil filter module to already mounted ethernet driver? If I do it, I get an error saying the resource is busy. And that is what even I was expecting. The ethernet driver is already mounted after startup.
Is it not true that pfil filter module has to be mounted only after the ethernet driver is loaded. Only then it makes sense for data extraction on the stack.
Please correct me if I am wrong.
All I want to do is attach my pfil filter module to my devn-i82544.so driver module which is already mounted.
Thanks
VinodVinod Kolapuram2010-01-14T20:30:33Zpost45255: Re: when does the iface_hook() gets invoked
http://community.qnx.com/sf/go/post45255
I'm sorry, I don't really understand where the misunderstanding is. If
anybody else knows, please jump in!
Please see below...
> When you say the interface is attached to which interface are you referring.
The network interface, e.g. en0 or wm0. What you create by loading a
devn-/devnp- network driver with correct parameters and which you remove
by calling ifconfig <ifname> destroy. In stack terminology this leads to
"attaching" and "detaching" the interface respectively.
Maybe the confusion is with these terms vs. the pf API which uses terms
"attach" and "detach" interface hooks? It's because they too refer to
the same event happening in the stack when they're called.
> My ethernet driver has to be mounted even before my filter gets mounted right?
>
I don't think there's a requirement that one loads before the other.
> My question is how to exercise my attach functionality and why doesn't the pfil filter module get attached to the active ethernet driver.
>
I'm afraid I don't understand what you mean here.
As I wrote before, "The PFIL_IFNET hook is invoked when the [network]
interface is attached (created) or detached (destroyed)." I.e. if you've
already loaded the network driver, then the network interface has likely
already been created and the PFIL_IFNET hook will be called for it until
the it is destroyed.
I'm hoping the above will help, if not then here's a good wiki page on
the topic:
http://community.qnx.com/sf/wiki/do/viewPage/projects.networking/wiki/Filtering_wiki_page
/PPatrik Lahti2010-01-14T20:25:22Zpost45254: Re: when does the iface_hook() gets invoked
http://community.qnx.com/sf/go/post45254
Hi Patrik,
Well that is my question. When you say the interface is attached to which interface are you referring. My ethernet driver has to be mounted even before my filter gets mounted right?
My question is how to exercise my attach functionality and why doesn't the pfil filter module get attached to the active ethernet driver.
Regards
VinodVinod Kolapuram2010-01-14T19:45:11Zpost45246: Re: when does the iface_hook() gets invoked
http://community.qnx.com/sf/go/post45246
On 13/01/10 08:20 PM, Vinod Kolapuram wrote:
> Hi,
> In io-pkt implementation , when does the iface_hook gets invoked.
The PFIL_IFNET hook is invoked when the interface is attached (created)
or detached (destroyed).
> I mount the filter and I see the input hook and output hook get invoked as a when packets come in and go out of stack. But I am unable to see the message I have put in when the iface_hook is added.
>
You probably loaded the filter after the interface was created.
Hope this helps!
/PPatrik Lahti2010-01-14T15:56:34Zpost45214: when does the iface_hook() gets invoked
http://community.qnx.com/sf/go/post45214
Hi,
In io-pkt implementation , when does the iface_hook gets invoked. I mount the filter and I see the input hook and output hook get invoked as a when packets come in and go out of stack. But I am unable to see the message I have put in when the iface_hook is added.
If I am not wrong this gets invoked when the filter module attaches to the driver ethernet driver module.
I do not see this happening.
I am just executing the sample code.
Can anyone please put in the right direction?
Regards
VinodVinod Kolapuram2010-01-14T01:20:15Zpost44676: Re: io-pkt mount problem
http://community.qnx.com/sf/go/post44676
On 05/01/10 08:12 PM, Vinod Kolapuram wrote:
> Hi,
> I am trying to mount a .so module for pfil implementation on QNX 6.4.0
>
> When I use "mount -Tio-pkt -o /root/install/myfilter.so"
> I get no file system table enry error as "No fstab entries found for type io-pkt"
>
-o is used for passing options to the .so you're trying to mount. But
you're passing no arguments after the -o.
Please see the documentation for mount, e.g. 'use mount' or
http://www.qnx.com/developers/docs/6.4.1/neutrino/utilities/m/mount.html
> Then I tried without the -o option "mount -Tio-pkt /root/install/myfilter.so"
> I get "Can't mount / (type io-pkt)"
> "possible reason: No such device or address"
>
I believe that can happen when there is unresolved symbols while loading
your .so. Such as when attempting to load a module which requires IPv6
parts of the stack into a stack that's io-pkt-v4*. Perhaps using the -v
option will tell you what's going on.
/PPatrik Lahti2010-01-06T16:42:15Zpost44638: io-pkt mount problem
http://community.qnx.com/sf/go/post44638
Hi,
I am trying to mount a .so module for pfil implementation on QNX 6.4.0
When I use "mount -Tio-pkt -o /root/install/myfilter.so"
I get no file system table enry error as "No fstab entries found for type io-pkt"
Then I tried without the -o option "mount -Tio-pkt /root/install/myfilter.so"
I get "Can't mount / (type io-pkt)"
"possible reason: No such device or address"
Can anyone help me?
Thanks
VinodVinod Kolapuram2010-01-06T01:12:51Zpost44634: Re: RE: ethernet driver for intel device ID: 10c9h
http://community.qnx.com/sf/go/post44634
Thanks Andrew.Vinod Kolapuram2010-01-06T00:21:37Zpost44631: RE: ethernet driver for intel device ID: 10c9h
http://community.qnx.com/sf/go/post44631
> device ID: "10c9h"
That's an intel 82576 which is supported by devnp-e1000.so
--
aboydAndrew Boyd(deleted)2010-01-05T23:47:04Zpost44604: ethernet driver for intel device ID: 10c9h
http://community.qnx.com/sf/go/post44604
Hi,
In the process of porting to io-pkt from io-net, now I face a problem with ethernet driver. I have a supermicro system with 5 ethernet ports, the make is Intel. I need the driver for Intel (R) PRO/100/1000. I looked at the device ID and its "10c9h".
But the avaialble driver list with QNX 6.4.0 ends at "10b9h" which has a part number as "-82572EI".
Can anyone help me find the driver for device ID: "10c9h"?
Thanks
VinodVinod Kolapuram2010-01-05T20:03:02Zpost44458: Re: qconn doesnt work after migration
http://community.qnx.com/sf/go/post44458
> Multicast Packets Received OK .............. 318
>
I see Andrew already spotted the problem for you, but for anybody
listening, here you see that all the packets you received were treated
as multicasts (because of that MAC address).
/PPatrik Lahti2009-12-30T14:18:39Zpost44456: Re: RE: qconn doesnt work after migration
http://community.qnx.com/sf/go/post44456
>
> ># nicinfo
> > Current Physical Node ID ................... 111213 141516
>
> Please set the first byte of your mac address to be zero instead
> of 0x11, because you have accidentally set the multicast bit
> in a unicast address.
>
> There's a better way to generate a mac address, if you're
> going to use this on a larger network.
>
> --
> aboyd
>
>
Thank a lot and a lot , Andrew.
It works! I didnt know that mac address has such a rule....Jesse Shao2009-12-30T12:04:10Zpost44455: RE: qconn doesnt work after migration
http://community.qnx.com/sf/go/post44455
># nicinfo
> Current Physical Node ID ................... 111213 141516
Please set the first byte of your mac address to be zero instead
of 0x11, because you have accidentally set the multicast bit
in a unicast address.
There's a better way to generate a mac address, if you're
going to use this on a larger network.
--
aboydAndrew Boyd(deleted)2009-12-30T11:30:42Zpost44449: Re: qconn doesnt work after migration
http://community.qnx.com/sf/go/post44449
it seems tcp received the request. why doesnt the qconn socket accept the request? It's just listening peacefully,but does nothing...Jesse Shao2009-12-30T01:56:05Zpost44448: Re: qconn doesnt work after migration
http://community.qnx.com/sf/go/post44448
sorry, i typed a bad command just now...
now here's what i got:
------------------------------------------------
# netstat -p ip
ip:
38 total packets received
0 bad header checksums
0 with size smaller than minimum
0 with data size < data length
0 with length > max ip packet size
0 with header length < data size
0 with data length < header length
0 with bad options
0 with incorrect version number
0 fragments received
0 fragments dropped (dup or out of space)
0 fragments dropped (out of ipqent)
0 malformed fragments dropped
0 fragments dropped after timeout
0 packets reassembled ok
38 packets for this host
0 packets for unknown/unsupported protocol
0 packets forwarded (0 packets fast forwarded)
0 packets not forwardable
0 redirects sent
0 packets no matching gif found
0 packets sent from this host
0 packets sent with fabricated ip header
0 output packets dropped due to no bufs, etc.
0 output packets discarded due to no route
0 output datagrams fragmented
0 fragments created
0 datagrams that can't be fragmented
0 datagrams with bad address in header
# netstat -p tcp
tcp:
0 packets sent
0 data packets (0 bytes)
0 data packets (0 bytes) retransmitted
0 ack-only packets (0 delayed)
0 URG only packets
0 window probe packets
0 window update packets
0 control packets
0 send attempts resulted in self-quench
18 packets received
0 acks (for 0 bytes)
0 duplicate acks
0 acks for unsent data
0 packets (0 bytes) received in-sequence
0 completely duplicate packets (0 bytes)
0 old duplicate packets
0 packets with some dup. data (0 bytes duped)
0 out-of-order packets (0 bytes)
0 packets (0 bytes) of data after window
0 window probes
0 window update packets
0 packets received after close
0 discarded for bad checksums
0 discarded for bad header offset fields
0 discarded because packet too short
0 connection requests
0 connection accepts
0 connections established (including accepts)
0 connections closed (including 0 drops)
0 embryonic connections dropped
0 delayed frees of tcpcb
0 segments updated rtt (of 0 attempts)
0 retransmit timeouts
0 connections dropped by rexmit timeout
0 persist timeouts (resulting in 0 dropped connections)
0 keepalive timeouts
0 keepalive probes sent
0 connections dropped by keepalive
0 correct ACK header predictions
0 correct data packet header predictions
0 PCB hash misses
0 dropped due to no socket
0 connections drained due to memory shortage
0 PMTUD blackholes detected
0 bad connection attempts
0 SYN cache entries added
0 hash collisions
0 completed
0 aborted (no space to build PCB)
0 timed out
0 dropped due to overflow
0 dropped due to bucket overflow
0 dropped due to RST
0 dropped due to ICMP unreachable
0 delayed free of SYN cache entries
0 SYN,ACKs retransmitted
0 duplicate SYNs received for entries already in the cache
0 SYNs dropped (no route or no space)
0 packets with bad signature
0 packets with good signature
0 sucessful ECN handshakes
0 packets with ECN CE bit
0 packets ECN ECT(0) bit
#
---------------------------------------------------------Jesse Shao2009-12-30T01:38:25Zpost44447: Re: qconn doesnt work after migration
http://community.qnx.com/sf/go/post44447
thanks a lot for early reply, Patrik
With your help,I found something wrong...
>What do the driver stats and the stack stats say? (nicinfo and netstat
>-p ip/tcp)
---------------------------------------------------------------------
# nicinfo
dm0:
DM9000 Ethernet Controller
Physical Node ID ........................... 000000 000000
Current Physical Node ID ................... 111213 141516
Current Operation Rate ..................... 100.00 Mb/s full-duplex
Active Interface Type ...................... MII
Active PHY address ....................... 0
Maximum Transmittable data Unit ............ 1500
Maximum Receivable data Unit ............... 1500
Hardware Interrupt ......................... 0x6b
Memory Aperture ............................ 0x1800300 - 0x18003ff
Promiscuous Mode ........................... Off
Multicast Support .......................... Enabled
Packets Transmitted OK ..................... 3
Bytes Transmitted OK ....................... 126
Broadcast Packets Transmitted OK ........... 0
Multicast Packets Transmitted OK ........... 0
Memory Allocation Failures on Transmit ..... 0
Packets Received OK ........................ 318
Bytes Received OK .......................... 24468
Broadcast Packets Received OK .............. 0
Multicast Packets Received OK .............. 318
Memory Allocation Failures on Receive ...... 0
Single Collisions on Transmit .............. 0
Multiple Collisions on Transmit ............ 0
Late Collision on Transmit errors .......... 0
Transmits aborted (excessive collisions) ... 0
Transmit Underruns ......................... 0
No Carrier on Transmit ..................... 0
Receive Alignment errors ................... 0
Received packets with CRC errors ........... 0
Packets Dropped on receive ................. 0
Short packets .............................. 0
Total Frames experiencing Collison(s) ...... 0
# netstat -p ip/tcp
netstat: ip/tcp: unknown or uninstrumented protocol
-----------------------------------------------------------------------
But isnt tcpip the default protocol of io-pkt???
why the protocol isnt up?Jesse Shao2009-12-30T01:21:48Zpost44443: Re: qconn doesnt work after migration
http://community.qnx.com/sf/go/post44443
Yes, qconn should work with io-pkt. And AFAIK if qconn starts then all
libs it needs must be available. What other programs it might need
depends on what you're doing, e.g. I believe pdebug is necessary on the
target for debugging with the IDE. Looks like you've got that though.
(Just check that it's available in qconn's path?)
Can you connect to any other TCP service on the target? E.g. telnetd,
sshd? What about UDP or raw IP? Does anything work?
What do the driver stats and the stack stats say? (nicinfo and netstat
-p ip/tcp)
Is there another driver you can try with and see if that works? E.g.
your original devn (io-net) driver?
Hope this may help!
/PPatrik Lahti2009-12-29T22:02:20Zpost44436: qconn doesnt work after migration
http://community.qnx.com/sf/go/post44436
Hi,
I've just migrated the kernel from 6.3.2 to 6.4.1(QNX momentics ide 4.6.0), and re-coded the network driver which is a native io-pkt driver.
Host(windows) and target(arm9) can “ping" each other. But when I want to debug an application via qconn, I found that IDE cant connect to the target. Then I telnet the qconn port (8000) to the target under windows, cant connect too.
I made a tcpdump, shows that target gets the "qconn request packet"(used the wireshark to check out what the qconn request packet is like...), but driver doesnt tx any packets, it seems the protocol stack doesnt make any response to that request.
Q:
Is the qconn shipped with momentics 4.6.0 compatible with the new io-pkt framework? Should I add any other libaries to image besides libsocket?
----------------------------------------
# netstat
Active Internet connections
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 *.8000 *.* LISTEN
udp 0 0 *.* *.*
# pidin -p qconn
pid tid name prio STATE Blocked
4103 1 sbin/qconn 10r SIGWAITINFO
4103 2 sbin/qconn 10r CONDVAR (0x120bc0)
4103 3 sbin/qconn 10r RECEIVE 1
4103 4 sbin/qconn 10r RECEIVE 3
# pidin -p qconn fd
pid name
4103 sbin/qconn
0 4 rw 0 /dev/ser1
1 4 rw 0 /dev/ser1
2 4 rw 0 /dev/ser1
3 5 rw 0 I4TCP *.8000 *.* LISTEN
4 4103
0s 1
2s 1 MP 0 /dev/dbgmem
4s 1 MP 0 /dev/profiler
#
----------------------------------------
attachment's my build fileJesse Shao2009-12-29T12:06:50Zpost44144: Re: compile errors on 6.4.0 for pfil implementation
http://community.qnx.com/sf/go/post44144
Hi Sean,
Thanks for letting me know that the io-pkt + drivers + lsm headers
haven't been vetted for C++.
I compiled the code using C compiler and I am able to build .so now.
Regards,
VKVinod Kolapuram2009-12-18T17:43:15Zpost44091: Re: pfil functions error
http://community.qnx.com/sf/go/post44091
Vinod Kolapuram wrote:
> Hi Patrik,
> Thanks for the input. I am not using VMware.
Well, it shouldn't take that long to build. Could be because you're
using Windows and/or cygwin. My full build took 7 minutes. Now we
probably have different hardware, so this is no indication of how long
it should take for you, but it shouldn't take a couple of hours.
> When I do a hinstall at libstartup folder nothing happens.
>
Err, I was thinking about a different repository. The file should be
installed into stage when you build io-pkt.
> I have a question regarding the stage folder.
>
> Since you siad stage folder should be in parallel to trunk.
There's no hard rule. I mentioned it is good practice because then you
know which stage is for what code (if you have multiple workspaces at
the same time).
Make sure you have set the QCONF_OVERRIDE environment variable (note
that it is underscore "_" not a dash "-" in the middle) and that it has
correct contents.
> When I executed the
> below commands
>
> % cd <BUILD_ROOT>/trunk
> % make OSLIST=nto hinstall
>
> which are at step 5 in the "build the OS Source". There was nothing written into stage folder. Don't you think there should be some out put written into this stage folder at this point of time?
>
Again, since the repository has changed, the wikis aren't totally up to
date. You'll need to cd deeper into the trunk before starting your
build. First into lib/socket to hinstall its headers, then into
lib/io-pkt to build the stack. When you're actually building something
you'll see that the stage area builds up with header files and
executables and libraries.
Also take note of:
"Request your patience that you work around the build by adding in a
Makefile.dnm to the component that is not building (Makefile.dnm ==
Makefile Do No Make )"
http://community.qnx.com/sf/wiki/do/viewPage/projects.core_os/wiki/BuildTheOSSource
> I have other problem with cygwin. As I mentioned earlier there are 4 versions of QNX OS on my machine. 630 632 640 and 641. I have installed cygwin from the net in my "C" folder. When I tried to execute the hinstall command from Libstartup folder, it gives me fatal error "system shared memory version mismatch detected - 0x8A88009C/0x2D1E009C". It clearly says that there might me more than one version of cygwin.dll, try deleting all except the latest version. I don't know if its a good idea now.
> Each version of QNX has a cygwin dll in the "bin" folder.
>
I don't have experience with cygwin. Nor have I used multiple versions
of the development tools installed at the same time. Perhaps you could
ask at the tools forum:
http://community.qnx.com/sf/discussion/do/listTopics/projects.toolchain/discussion.core_development_tools
Or one of the core os forums:
http://community.qnx.com/sf/go/projects.core_os/discussion
> Making the source code compile has become a big task for me.
>
I'm sorry about that. It shouldn't be that hard. Please try the steps
and checks I've outlined.
I just verified on a fresh checkout that it works for me. I only had to
create a Makefile.dnm in lib/io-pkt/sys/dev_qnx/e1000 directory because
of an outside dependency.
Hope this helps!
/PPatrik Lahti2009-12-18T02:41:41Zpost44087: Re: compile errors on 6.4.0 for pfil implementation
http://community.qnx.com/sf/go/post44087
Thanks Sean.
Now I have to update my Jam make file to make it use C compiler.
Do you have any idea of changing the option in Jam file or is it again in some binary where you cannot change it?
I am looking on the website too, but thought of asking you, if you know already.
Regards
VinodVinod Kolapuram2009-12-17T22:37:47Zpost44086: Re: compile errors on 6.4.0 for pfil implementation
http://community.qnx.com/sf/go/post44086
On Thu, Dec 17, 2009 at 04:59:14PM -0500, Vinod Kolapuram wrote:
> Hi,
> We have all the binaries for 6.4.0 on which we are planning port ion-net to io-pkt. I am attaching the errors I get which makes me feel that the header files and the binaries are in mismatch.
>
> I am running a sample pfil code.
>
> Can anyone please guess whats going on.
You're using c++. The io-pkt + drivers + lsm headers
haven't been vetted for C++.
Regards,
-seanbSean Boudreau(deleted)2009-12-17T22:09:14Zpost44085: compile errors on 6.4.0 for pfil implementation
http://community.qnx.com/sf/go/post44085
Hi,
We have all the binaries for 6.4.0 on which we are planning port ion-net to io-pkt. I am attaching the errors I get which makes me feel that the header files and the binaries are in mismatch.
I am running a sample pfil code.
Can anyone please guess whats going on.
Regards
VinodVinod Kolapuram2009-12-17T21:59:12Zpost44050: Re: pfil functions error
http://community.qnx.com/sf/go/post44050
Hi Patrik,
Thanks for the input. I am not using VMware.
When I do a hinstall at libstartup folder nothing happens.
I have a question regarding the stage folder.
Since you siad stage folder should be in parallel to trunk. When I executed the
below commands
% cd <BUILD_ROOT>/trunk
% make OSLIST=nto hinstall
which are at step 5 in the "build the OS Source". There was nothing written into stage folder. Don't you think there should be some out put written into this stage folder at this point of time?
I have other problem with cygwin. As I mentioned earlier there are 4 versions of QNX OS on my machine. 630 632 640 and 641. I have installed cygwin from the net in my "C" folder. When I tried to execute the hinstall command from Libstartup folder, it gives me fatal error "system shared memory version mismatch detected - 0x8A88009C/0x2D1E009C". It clearly says that there might me more than one version of cygwin.dll, try deleting all except the latest version. I don't know if its a good idea now.
Each version of QNX has a cygwin dll in the "bin" folder.
Making the source code compile has become a big task for me.
Or can anyone please let me know the libs and binaries needed for implemention pfil hook under io-pkt for QNX6.4.0 . I just want to try out with the latest headers & binaries so that I can rule out the possibility of missing stuff.
Thanks
VinodVinod Kolapuram2009-12-17T19:33:46Zpost44010: Re: pfil functions error
http://community.qnx.com/sf/go/post44010
Vinod Kolapuram wrote:
> Hi Patrik,
> That is what I was thinking too, there is no make file except the "qconf-override.mk" I buiild with few parameters as explained in the link below.
>
> But the below links suggested I should build it from the build directory (which is the directory where I do a svn checkout .
>
> http://community.qnx.com/sf/wiki/do/viewPage/projects.core_os/wiki/BuildTheOSSource
>
> http://community.qnx.com/sf/wiki/do/viewPage/projects.networking/wiki/Source_Guide
>
Perhaps the wiki needs updating now that in the repository splits
libsocket and the stack:
trunk/lib/socket <- libsocket
trunk/lib/io-pkt <- stack stuff
It used to be that the two shared trunk root dir.
> Then according to you even the "stage" folder has to be created in io-pkt folder for the binaries to be put in there.
>
The stage can really be anywhere. It's good practice to have it parallel
to your trunk dir.
> Most of the information or statements here contradict each other. For a new comer like me its a never ending ride.
>
Apologies if it's confusing, we've just moved things in the repository
around.
> It took almost couple of hours to build
That's surprising, what are you building on? VMware?
> and broke at "io-pkt/sys/lib/libdrvr". Here a file "hwi_find_bus.c" includes "<drvr/hwinfo.h>", this file in turn includes "<sys/hwinfo.h>" This file is located at "io-pkt/sys/lib/libstartup/public/sys/". The errors I get is this "sys/hwinfo.h" is not available to the make file. Should I update the header file with full path or should I update the make file itself. I am not that familiar with make file, but I have attached the one which should infact make that folder available for compilation. Can you have a look at let me know.
>
You'll need to hinstall from lib/libstartup.
/PPatrik Lahti2009-12-17T13:56:24Zpost43978: Re: pfil functions error
http://community.qnx.com/sf/go/post43978
Hi Patrik,
That is what I was thinking too, there is no make file except the "qconf-override.mk" I buiild with few parameters as explained in the link below.
But the below links suggested I should build it from the build directory (which is the directory where I do a svn checkout .
http://community.qnx.com/sf/wiki/do/viewPage/projects.core_os/wiki/BuildTheOSSource
http://community.qnx.com/sf/wiki/do/viewPage/projects.networking/wiki/Source_Guide
Then according to you even the "stage" folder has to be created in io-pkt folder for the binaries to be put in there.
Most of the information or statements here contradict each other. For a new comer like me its a never ending ride.
I though of building at least the lsm folder under "io-pkt/sys/". I was able to buiid it successfully. Then I though od building the whole source tree from io-pkt folder. So I executed the " make OSLIST=nto hinstall " and it seemed to work. Then I executed "make OSLIST=nto install " It took almost couple of hours to build and broke at "io-pkt/sys/lib/libdrvr". Here a file "hwi_find_bus.c" includes "<drvr/hwinfo.h>", this file in turn includes "<sys/hwinfo.h>" This file is located at "io-pkt/sys/lib/libstartup/public/sys/". The errors I get is this "sys/hwinfo.h" is not available to the make file. Should I update the header file with full path or should I update the make file itself. I am not that familiar with make file, but I have attached the one which should infact make that folder available for compilation. Can you have a look at let me know.
Thanks
VinodVinod Kolapuram2009-12-17T00:36:26Zpost43954: Re: pfil functions error
http://community.qnx.com/sf/go/post43954
> 1. To build a io-pkt filter module, do I need to do such a huge exercise by downloading the fullsource tree and buiilding?
>
That's actually not such a huge task. Try it, you might like it :-)
> On the 5th step I am unable to execute "make OSLIST=nto hinstall ". I get an erro. I took a snapshort of my error and attaching it in a jpg file. On this spare machine I also have older versions of QNX630 and 632.
>
There's no makefile where you issue the make command. You need to
navigate down to lib/io-pkt.
/PPatrik Lahti2009-12-16T18:26:42Zpost43951: Re: pfil functions error
http://community.qnx.com/sf/go/post43951
Hi Robert,
Thanks for the help but I am facing few problems here.
1. To build a io-pkt filter module, do I need to do such a huge exercise by downloading the fullsource tree and buiilding?
2. For our project, we have 6.4.0. OS with needed binaries and headers. I want to build a io-pkt filter module on 6.4.0. This is on a seperate machine.
3. On the other spare machine I tried doing the full source checkout (with a pre-requisite of 6.4.1, which I installed it on my PC) and I have executed the first 4 steps to build the source tree. The steps are given at below link.
http://community.qnx.com/sf/wiki/do/viewPage/projects.core_os/wiki/BuildTheOSSource
On the 5th step I am unable to execute "make OSLIST=nto hinstall ". I get an erro. I took a snapshort of my error and attaching it in a jpg file. On this spare machine I also have older versions of QNX630 and 632.
4.But the ".metadata" folder is created in the build directory.
5. Even if I am making my sample code work on this new build with 6.4.1, how am I going to make it work on 6.4.0. I would end up not knowing the missing files and binaries for 6.4.0 to build the pfil hook. I am using Jamfile to build my application on 6.4.0.
I think there should me a smooth transition for building io-pkt from io-net.
Hi Sean,
when I tried to put the _KERNEL define in my Makefile (Jamfile).
I started getting lots of missing files and path mismatch. I corrected the path mismatch by including the io-pkt/sys folder in my Makefile. I was able to get rid of all the path mismatch errors. Now I get few erros like in the libkern.h file
"error: 'std::uintmax_t strtoumax(const char*, char**, int)'
conflicts with previous using declaration
'std::uintmax_t std::strtoumax(const char*, char**, int)'
I also get many errors in systm.h for the function "copyinstr() the errors are invalid conversion from void * to char*.
I think might be my project with 6.4.0 does not have the right headers or the binaries for the headers or they can be mismatch with these.
Please try to put me in the right direction.
Thanks
VinodVinod Kolapuram2009-12-16T18:06:18Zpost43905: Re: pfil functions error
http://community.qnx.com/sf/go/post43905
Hi Vinod:
You can definitely build filters under 6.4.0. Just do the same thing as suggested previously by downloading and building the full source tree and then placing your build directory under sys/lsm (and copy one of the other LSM build infrastructure).
Robert.Robert craig2009-12-15T20:12:53Zpost43904: Re: pfil functions error
http://community.qnx.com/sf/go/post43904
Sorry there was a typo in my prvious posting , its QNX not QNC.Vinod Kolapuram2009-12-15T19:56:59Zpost43903: Re: pfil functions error
http://community.qnx.com/sf/go/post43903
Hi Robert,
As I mentioned I was trying to build the pfil hook application on 6.4.0, not 6.4.1. In the QNC documentation where I downloaded the Core Netowrking source code, it clearly mentions that the pre-requisite is 6.4.1.
Can I not build the io-pkt pfil related application on 6.4.0.
As Sean mentioned when I added the _KERNEL flag, I was able to see many missing files and might be even the different versions of the files which are needed to build the pfil hook application properly.
But my question is can we not buiild pfil hook filter module on 6.4.0?
If yes then what are the extra files, folder, libraries needed to support the pfil hook implementation.
Or is it a msut that I should have minimum 6.4.1 version of QNX to implement pfil hook application?
Right now I am downloading 6.4.1.
Thanks
VinodVinod Kolapuram2009-12-15T19:55:11Zpost43785: Re: pfil functions error
http://community.qnx.com/sf/go/post43785
I haven't done this in a while, so maybe things have changed, but when I was building a filter, the full source tree was checked out and built, I placed the build directory under .../sys/lsm/... and I copied the build infrastructure from one of the other lsm's (common.mk etc). I'd start with copying the build infrastructure and see what happens (note that the lsm.mk file here assumes that the full tree is in place
http://community.qnx.com/integration/viewvc/viewvc.cgi/trunk/lib/io-pkt/sys/lsm/?root=core_networking&system=exsy1001)
)
The wiki should really be updated to include information on how to build a filter :>.
Robert.Robert craig2009-12-14T14:27:58Zpost43739: Re: pfil functions error
http://community.qnx.com/sf/go/post43739
On Fri, Dec 11, 2009 at 05:23:55PM -0500, Vinod Kolapuram wrote:
> Hello,
> I have a question regarding the pfil hook functions. The below link has some example code to add and remove a pfil hook along with entry function.
>
> http://www.qnx.com/developers/docs/6.4.1/io-pkt_en/user_guide/filtering.html#Packet_Filters
>
> This code when compiled gives me errors for all the pfil calls, like
> pfil_head_get(), pfil_add_hook(), pfil_remove_hook() etc. Do I have to include any library. I am building this on QNX6.4.0. I have all the header files needed for io-pkt.
>
> I get an error saying the above pfil calls "was not declared in this scope".
>
> Can you please let me know if I have to include any libs for pfil functions
>
You probaly need to have _KERNEL defined. Also make sure
you're buiding a dll.
-seanbSean Boudreau(deleted)2009-12-12T00:11:07Zpost43735: pfil functions error
http://community.qnx.com/sf/go/post43735
Hello,
I have a question regarding the pfil hook functions. The below link has some example code to add and remove a pfil hook along with entry function.
http://www.qnx.com/developers/docs/6.4.1/io-pkt_en/user_guide/filtering.html#Packet_Filters
This code when compiled gives me errors for all the pfil calls, like
pfil_head_get(), pfil_add_hook(), pfil_remove_hook() etc. Do I have to include any library. I am building this on QNX6.4.0. I have all the header files needed for io-pkt.
I get an error saying the above pfil calls "was not declared in this scope".
Can you please let me know if I have to include any libs for pfil functions
Thanks
VinodVinod Kolapuram2009-12-11T22:23:54Zpost43719: Re: Does shim driver work with Filter/converter module?
http://community.qnx.com/sf/go/post43719
Thanks Robert.
I have one more question. In my posting I have included a link of the sample code (example of adding a hook and removing a hook and the entry function etc.) for io-pkt. This code when compiled gives me errors for all the pfil calls, like pfil_get_get(), pfil_add_hook(), pfil_remove_hook() etc. Do I have to include any library. I am building this on QNX6.4.0. I have all the header files needed for io-pkt.
I get an error saying the above pfil calls "was not declared in this scope".
Can you please let me know if I have to include any libs
Thanks
VinodVinod Kolapuram2009-12-11T20:38:36Zpost43592: Re: Does shim driver work with Filter/converter module?
http://community.qnx.com/sf/go/post43592
Hi Vinod:
The shim layer only provides compatibility for the driver interface. The filter / converter interface is in the stack, so the shim layer won't do anything for you. There's more information on io-pkt filters located here:
http://community.qnx.com/sf/wiki/do/viewPage/projects.networking/wiki/Filtering_wiki_page
And a good (if complicated) example is here:
http://community.qnx.com/integration/viewvc/viewvc.cgi/trunk/lib/io-pkt/sys/lsm/nraw/?root=core_networking&system=exsy1001
You can also look at how mbufs and npkts are converted by taking a look in the shim layer here:
http://community.qnx.com/integration/viewvc/viewvc.cgi/trunk/lib/io-pkt/sys/dev_qnx/shim/io-net.c?revision=1&root=core_networking&system=exsy1001&view=markup
(look for npkt2mbuf and mbuf2npkt).
Still a large learning curve, but I hope this helps,
Robert.Robert craig2009-12-10T22:38:12Zpost43587: Does shim driver work with Filter/converter module?
http://community.qnx.com/sf/go/post43587
Hello,
I want to know if the shim driver which is used for backward compatibility to use with io-net NIC driver from QNX6.4 under io-pkt, is workable even for the filter/converter module.
I am porting the filter module from io-net to io-pkt. If this shim driver works for filter/converter module then I can try using the shim driver.
I have browsed through the forum and internet for porting related info but was able to find an example of using the pfil hook to access mbuf at
http://www.qnx.com/developers/docs/6.4.1/io-pkt_en/user_guide/migrating.html
Can anyone please give me some more input on using mbuf so that I can straight away convert to iov type or point me to some example in BSD implementation, which at least reduces my effort in understanding.
Regards
VinodVinod Kolapuram2009-12-10T21:56:44Zpost42448: Re: Can't find sys/io-pkt.h in QNX 6.4.0
http://community.qnx.com/sf/go/post42448
Thanks Robert. I will follow the same.
Regards
VinodVinod Kolapuram2009-11-23T23:28:24Zpost42426: Re: Can't find sys/io-pkt.h in QNX 6.4.0
http://community.qnx.com/sf/go/post42426
Hi Vinod:
Putting the header files into the location specified in the wiki (i.e. in the system include directory) makes them compatible with future revisions of the OS.
Robert.Robert craig2009-11-23T20:28:05Zpost42408: Re: Can't find sys/io-pkt.h in QNX 6.4.0
http://community.qnx.com/sf/go/post42408
Thanks Robert, I have got the whole folder. Should I maintain the same directory structure under io-pkt as it created or can I merge the sys folder files with the sysfolder. If my development goes on with this folder for io-pkt, then in new versions of QNX I might have to redo or atleast make sure the file paths are OK.
Regards
VinodVinod Kolapuram2009-11-23T18:27:04Zpost42407: Re: Can't find sys/io-pkt.h in QNX 6.4.0
http://community.qnx.com/sf/go/post42407
Thanks I got it from wikiVinod Kolapuram2009-11-23T18:21:48Zpost42358: Re: Can't find sys/io-pkt.h in QNX 6.4.0
http://community.qnx.com/sf/go/post42358
You can also take a look at the Drivers wiki here:
http://community.qnx.com/sf/wiki/do/viewPage/projects.networking/wiki/Drivers_wiki_page
It's covered right at the bottom of the page.
Robert.Robert craig2009-11-21T16:30:59Zpost42351: Re: Can't find sys/io-pkt.h in QNX 6.4.0
http://community.qnx.com/sf/go/post42351
On Fri, Nov 20, 2009 at 07:03:17PM -0500, Vinod Kolapuram wrote:
> Hi,
> can anyone help me find the file "sys/io-pkt.h" in QNX 6.4.0? I am working on porting of io-net to io-pkt and I do not see the mentioned file. I would really appreciate if someone who already worked on this, can guide me please.
That file didn't exist in 6.4.0. It appeared in 6.4.1.
You can get it from the repo in the networking project
though.
-seanbSean Boudreau(deleted)2009-11-21T00:20:51Zpost42350: Can't find sys/io-pkt.h in QNX 6.4.0
http://community.qnx.com/sf/go/post42350
Hi,
can anyone help me find the file "sys/io-pkt.h" in QNX 6.4.0? I am working on porting of io-net to io-pkt and I do not see the mentioned file. I would really appreciate if someone who already worked on this, can guide me please.
Thanks
VinodVinod Kolapuram2009-11-21T00:03:16Zpost40579: RE: RE: about CAN card driver
http://community.qnx.com/sf/go/post40579
thank you! I found a card from steinhoff company.
so I donnot need to develop the driver.
the next step, I must learn to how to use it.
--- 09年10月21日,周三, Andrew Boyd <community-noreply@qnx.com> 写道:
发件人: Andrew Boyd <community-noreply@qnx.com>
主题: RE: RE: about CAN card driver
收件人: "ionetmig-networking" <post40421@community.qnx.com>
日期: 2009年10月21日,周三,下午9:41
> I want to use the PCI CAN Card
ok, it was worth a shot - CANBUS isn't exactly
high-bandwidth :)
I would recommend seeing what documentation
(registers etc) you can dig up, and perhaps
a sample source driver for another OS for this
card.
Then, look at how memory is mapped in QNX, and
interrupts are handled - both ridiculously easy,
look at any QNX driver source on the foundry -
and that's probably about all you need.
--
aboyd
_______________________________________________
io-net migration
http://community.qnx.com/sf/go/post40421
___________________________________________________________
好玩贺卡等你发,邮箱贺卡全新上线!
http://card.mail.cn.yahoo.com/di hu2009-10-23T02:23:53Zpost40421: RE: RE: about CAN card driver
http://community.qnx.com/sf/go/post40421
> I want to use the PCI CAN Card
ok, it was worth a shot - CANBUS isn't exactly
high-bandwidth :)
I would recommend seeing what documentation
(registers etc) you can dig up, and perhaps
a sample source driver for another OS for this
card.
Then, look at how memory is mapped in QNX, and
interrupts are handled - both ridiculously easy,
look at any QNX driver source on the foundry -
and that's probably about all you need.
--
aboydAndrew Boyd(deleted)2009-10-21T13:41:00Zpost40392: Re: RE: about CAN card driver
http://community.qnx.com/sf/go/post40392
Yes
I want to use the PCI CAN Card
if anyone have the PCI CAN Card driver that good
Our system cannot use the CAN-USB adopter, because it is not real-time, and communicate with the other device by USB, I think it is not a good idea.
thank you!di hu2009-10-21T05:50:42Zpost40325: RE: about CAN card driver
http://community.qnx.com/sf/go/post40325
> I want to develop a PCI bus CAN card driver
Does it have to be PCI?
I think people here have a CANBUS-to-USB
adapter running under QNX.
Would that do what you want? You don't have
to write any software to make that work, just
get the canbus-to-usb adapter, which I don't
think was very expensive..
--
aboyd www.poweredbyqnx.com/movies/L39_form.wmvAndrew Boyd(deleted)2009-10-20T13:38:29Zpost40306: about CAN card driver
http://community.qnx.com/sf/go/post40306
hello, I want to develope a PCI bus CAN card driver. where could get the example driver? and some introduction about PCI Card driver develope.
Thank you!di hu2009-10-20T08:41:59Zpost37394: Re: ntpdate failure
http://community.qnx.com/sf/go/post37394
I had /etc/services, but only entries for ftp and telnet. Added ntp and it now works. It worked under QNX6.3.2 without that entry. Thanks!
>
> Shot in the dark...
>
> Do you have /etc/services ?
>
> -seanb
>Todd Peterson(deleted)2009-09-04T16:38:54Zpost37391: Re: ntpdate failure
http://community.qnx.com/sf/go/post37391
Shot in the dark...
Do you have /etc/services ?
-seanb
On Fri, Sep 04, 2009 at 11:56:21AM -0400, Todd Peterson wrote:
> I issue the following commands after the network is up under QNX6.3.2:
>
> export TZ=MST7MDT
> ntpdate ntp
> ntpd -g
>
> All works fine.
>
> Under QNX6.4.1 I get the following behavior:
>
> # export TZ=MST7MDT
> # ntpdate ntp
> Error : servname not supported for ai_socktype
> 31 Dec 17:30:11 ntpdate[274445]: can't find host ntp
>
> 31 Dec 17:30:11 ntpdate[274445]: no servers can be used, exiting
>
> Process 274445 (ntpdate) exited status=1.
>
> ntp is in my /etc/hosts file and I can ping & nslookup ntp:
>
> # ping ntp
> PING ntp.mgtsciences.com (172.23.93.7): 56 data bytes
> 64 bytes from 172.23.93.7: icmp_seq=0 ttl=64 time=9 ms
> 64 bytes from 172.23.93.7: icmp_seq=1 ttl=64 time=4 ms
> 64 bytes from 172.23.93.7: icmp_seq=2 ttl=64 time=3 ms
> 64 bytes from 172.23.93.7: icmp_seq=3 ttl=64 time=5 ms
> 64 bytes from 172.23.93.7: icmp_seq=4 ttl=64 time=4 ms
>
> ----ntp.mgtsciences.com PING Statistics----
> 5 packets transmitted, 5 packets received, 0% packet loss
> round-trip min/avg/max = 3/5/9 ms variance = 5 ms^2
>
> Process 290829 (ping) exited status=0.
> # nslookup ntp
> Server: 172.23.93.3
> Address: 172.23.93.3#53
>
> Name: ntp.mgtsciences.com
> Address: 172.23.93.7
>
>
> Process 299021 (nslookup) exited status=0.
>
> sloginfo did not produce anything other than a line:
> Dec 31 17:00:26 3 25 0 Couldn't initialize listen service: tcp (Address already in use)
>
>
> Any suggestions?
>
>
>
>
>
> _______________________________________________
>
> io-net migration
> http://community.qnx.com/sf/go/post37384
>Sean Boudreau(deleted)2009-09-04T16:12:18Zpost37384: ntpdate failure
http://community.qnx.com/sf/go/post37384
I issue the following commands after the network is up under QNX6.3.2:
export TZ=MST7MDT
ntpdate ntp
ntpd -g
All works fine.
Under QNX6.4.1 I get the following behavior:
# export TZ=MST7MDT
# ntpdate ntp
Error : servname not supported for ai_socktype
31 Dec 17:30:11 ntpdate[274445]: can't find host ntp
31 Dec 17:30:11 ntpdate[274445]: no servers can be used, exiting
Process 274445 (ntpdate) exited status=1.
ntp is in my /etc/hosts file and I can ping & nslookup ntp:
# ping ntp
PING ntp.mgtsciences.com (172.23.93.7): 56 data bytes
64 bytes from 172.23.93.7: icmp_seq=0 ttl=64 time=9 ms
64 bytes from 172.23.93.7: icmp_seq=1 ttl=64 time=4 ms
64 bytes from 172.23.93.7: icmp_seq=2 ttl=64 time=3 ms
64 bytes from 172.23.93.7: icmp_seq=3 ttl=64 time=5 ms
64 bytes from 172.23.93.7: icmp_seq=4 ttl=64 time=4 ms
----ntp.mgtsciences.com PING Statistics----
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 3/5/9 ms variance = 5 ms^2
Process 290829 (ping) exited status=0.
# nslookup ntp
Server: 172.23.93.3
Address: 172.23.93.3#53
Name: ntp.mgtsciences.com
Address: 172.23.93.7
Process 299021 (nslookup) exited status=0.
sloginfo did not produce anything other than a line:
Dec 31 17:00:26 3 25 0 Couldn't initialize listen service: tcp (Address already in use)
Any suggestions?Todd Peterson(deleted)2009-09-04T15:56:20Zpost37327: Re: io-pkt and Asix driver behavior
http://community.qnx.com/sf/go/post37327
I seem to remember that the ASIX driver had this SIGKILL thing that it would do if it couldn't set something up, so it's possible that this is what you're seeing (and this would be a driver issue rather than the stack). You might want to try starting the driver up in verbose mode and post the sloginfo output. To me, this seems to be more of a problem with io-usb than io-pkt. If io-usb has registered /dev/io-usb before it's ready to process requests, then this would be a Bad Thing. Someone should take a dig through the driver code for 6.4.1 to confirm what's causing the SIGKILL to be sure.
R.Robert craig2009-09-03T20:47:14Zpost37265: Re: io-pkt and Asix driver behavior
http://community.qnx.com/sf/go/post37265
> Hi Todd,
>
> I'm not very familiar with USB but I don't think io-pkt should crash. Do
> you happen to have a core file from when io-pkt crashes? It sounds like
> you did some analysis on it because you say USB is not fully
> initialized? Or, by "die", do you mean something else?
io-pkt exits via SIGKILL if I just do a waitfor /dev/io-usb/io-usb (instead of sleep), as suggested. The waitfor did work under QNX6.3.2. sloginfo does not provide any clues as to why it exited, except that I see a bunch of io-usb stuff following where io-pkt tries to launch. io-pkt was running OK today and actually did crash with SIGSEGV while I was at lunch (nothing really running on the board).
Process 4102 (io-pkt-v4) terminated SIGSEGV code=1 fltno=11 ip=01088cd4
>
> You could try maybe "waitfor /dev/io-usb/io-usb" as described here:
> http://www.qnx.com/developers/docs/6.4.1/neutrino/user_guide/hardware.html#USB
>
> scroll down to "Ethernet adapters".
>
> Cheers!
> /P
>
> Todd Peterson wrote:
> > In 6.3.2, I start the USB driver:
> >
> > io-usb -vvv -dohci ioport=0x31020000,irq=59,verbose=5
> >
> > and then waitfor /dev/io-usb/io-usb
> >
> > and then start io-net
> >
> > In 6.4.1, if I follow the same steps, except use io-pkt, io-pkt dies,
> because the USB is not fully initialized. If I do a sleep 2, and then start io
> -pkt, it works fine. But, I hate using a sleep, instead of waiting for some
> evidence that the USB is up.
> >
> > Any suggestions?
> >
> > working .bsh snippet:
> >
> > io-usb -vvv -dohci ioport=0x31020000,irq=59,verbose=5
> > sleep 2
> > io-pkt-v4 -d asix -p tcpip
> >
> >
> >
> >
> > _______________________________________________
> >
> > io-net migration
> > http://community.qnx.com/sf/go/post37047
> >
> >Todd Peterson(deleted)2009-09-03T15:10:47Zpost37220: Re: io-pkt and Asix driver behavior
http://community.qnx.com/sf/go/post37220
Hi Todd,
I'm not very familiar with USB but I don't think io-pkt should crash. Do
you happen to have a core file from when io-pkt crashes? It sounds like
you did some analysis on it because you say USB is not fully
initialized? Or, by "die", do you mean something else?
You could try maybe "waitfor /dev/io-usb/io-usb" as described here:
http://www.qnx.com/developers/docs/6.4.1/neutrino/user_guide/hardware.html#USB
scroll down to "Ethernet adapters".
Cheers!
/P
Todd Peterson wrote:
> In 6.3.2, I start the USB driver:
>
> io-usb -vvv -dohci ioport=0x31020000,irq=59,verbose=5
>
> and then waitfor /dev/io-usb/io-usb
>
> and then start io-net
>
> In 6.4.1, if I follow the same steps, except use io-pkt, io-pkt dies, because the USB is not fully initialized. If I do a sleep 2, and then start io-pkt, it works fine. But, I hate using a sleep, instead of waiting for some evidence that the USB is up.
>
> Any suggestions?
>
> working .bsh snippet:
>
> io-usb -vvv -dohci ioport=0x31020000,irq=59,verbose=5
> sleep 2
> io-pkt-v4 -d asix -p tcpip
>
>
>
>
> _______________________________________________
>
> io-net migration
> http://community.qnx.com/sf/go/post37047
>
>Patrik Lahti2009-09-02T18:55:14Zpost37047: io-pkt and Asix driver behavior
http://community.qnx.com/sf/go/post37047
In 6.3.2, I start the USB driver:
io-usb -vvv -dohci ioport=0x31020000,irq=59,verbose=5
and then waitfor /dev/io-usb/io-usb
and then start io-net
In 6.4.1, if I follow the same steps, except use io-pkt, io-pkt dies, because the USB is not fully initialized. If I do a sleep 2, and then start io-pkt, it works fine. But, I hate using a sleep, instead of waiting for some evidence that the USB is up.
Any suggestions?
working .bsh snippet:
io-usb -vvv -dohci ioport=0x31020000,irq=59,verbose=5
sleep 2
io-pkt-v4 -d asix -p tcpipTodd Peterson(deleted)2009-09-01T17:37:55Zpost36951: Re: duplicat IP Address
http://community.qnx.com/sf/go/post36951
On Mon, Aug 31, 2009 at 01:14:39AM -0400, kaku xing wrote:
> Hello
>
> I know that there is "duplicat IP Address..." information show in sloginfo when my PC's IP address conflict with others.
> However, does anybody know what QNX API could provide this facility for our program to detect this situation?
>
> Because I have many io-net. example: /dev/io-net/en0 (192.168.0.1) ???/dev/io-net2/en0 (192.168.0.1)
> How do I point to the "/dev/io-nt2/eno" ? And what do QNX API?
>
> Thanks for your time.
>
>
> seanb say :
>
> There is a stat logged:
>
> # netstat -p arp | grep duplicate
>
> You could do the equivalent of what netstat does.
netstat honours the SOCK envirinmental variable. /dev/io-net*
doesn't come into play here. Check out the 'prefix' argument
to the stack:
# io-pkt -ptcpip
# netstat -parp | grep duplicate
vs
# io-pkt -ptcpip prefix=/alt
# SOCK=/alt netstat -parp | grep duplicate
The source to netstat is in the networking project on foundry27
-seanbSean Boudreau(deleted)2009-08-31T13:08:28Zpost36924: duplicat IP Address
http://community.qnx.com/sf/go/post36924
Hello
I know that there is "duplicat IP Address..." information show in sloginfo when my PC's IP address conflict with others.
However, does anybody know what QNX API could provide this facility for our program to detect this situation?
Because I have many io-net. example: /dev/io-net/en0 (192.168.0.1) 、/dev/io-net2/en0 (192.168.0.1)
How do I point to the "/dev/io-nt2/eno" ? And what do QNX API?
Thanks for your time.
seanb say :
There is a stat logged:
# netstat -p arp | grep duplicate
You could do the equivalent of what netstat does.
Best Regards
Formosa Plastics Corp.Electronic Group
Ching Hsun Kuo 郭憬勳
TEL : (07)3711411 EXT 6470
FAX : (07)372-7026
E-MAIL: robby0524@fpc.com.tw
100,SueiGuan Road,Jen-Wu Hsiang,Kaohsiung,Taiwan
814高雄縣仁武鄉水管路100號kaku xing2009-08-31T05:14:39Zpost36436: simultaneous packet sending
http://community.qnx.com/sf/go/post36436
I have a quad port network card and I am trying to send one packet with size of 121 byes to each network interface every 250 us.
I am using pcap.h for this purpose. Currently I am using a time to create 250usec and I send four packets to four network interfaces consecutively. I have one more similar network card installed in another PC running winxp. These two network cards are connected together through four cross wires. I am using the second PC for monitoring.
As I am running four pcap_sendpacket() functions consecutively, there would be about 20us delay between the first and second interface packets and the same for second and third and so on.
Is there any way to send packets simultaneously or at least reduce the delay to few us.
Do you think if I use for timers and calibrate them I can do the job or not?
Regards,
MohammadMohammad Dadashzadeh(deleted)2009-08-21T16:18:37Zpost35874: Re: RE: RE: QNET over IP on QNX 6.4.0 - automatic population of remote nodes in /net folder
http://community.qnx.com/sf/go/post35874
Its definitely an important feature for our project.
In our project the total application depends on the "/net" folder.
If /net is populated automatically then there will not be an extra stuff to the TDP oeration and make an entry in /net.
i mean I need not maintain a lists in /etc/hosts.
If a hostname is changed again its a big headache to modify the /etc/hosts file...on all the nodes.soujanya Yelchuri2009-08-13T06:31:55Zpost35815: RE: RE: QNET over IP on QNX 6.4.0 - automatic population of remote nodes in /net folder
http://community.qnx.com/sf/go/post35815
> Why this important feature is removed from QNX 6.4.0??
It wasn't removed - it's simply a difference between
the resolvers used with ethernet bind, and ip bind.
I had no idea that anyone considered the "hints"
in /net an important feature! I personally think
they're nice to see, but whether or not they are
there should not really affect the time it takes
to resolve a new host.
--
aboydAndrew Boyd(deleted)2009-08-12T13:30:29Zpost35799: Re: RE: QNET over IP on QNX 6.4.0 - automatic population of remote nodes in /net folder
http://community.qnx.com/sf/go/post35799
hi,
Does any one let me the status of P.S. 69603 .
In future is there any chance that i get auto pop up of /net with QNET over IP.?? in the later versions of QNX 6.4.X???
Any idea..??
Its the major stop issue for me for migration to QNX 6.4.0
Is there any quick fix ??
Why this important feature is removed from QNX 6.4.0??soujanya Yelchuri2009-08-12T09:49:07Zpost35649: Re: Move from devn-mpc85xx.so to devnp-mpc85xx.so: how to keep the device name
http://community.qnx.com/sf/go/post35649
There are still problems with this, even in 6.4.1. If you force the name prefix to "en", probably the most common use of the option, then nicinfo stops working, since it thinks the "en" prefix indicates it's dealing with an io-net driver and it calls doit_ionet() instead of doit(). Calling doit() when doit_ionet() fails almost fixes the problem --- you get info, but you get each driver's name twice, once from the failed doit_ionet() and once from doit().
MurfJohn Murphy2009-08-11T10:37:44Zpost35138: Re: npm-rawcan ethernet driver
http://community.qnx.com/sf/go/post35138
On Mon, Aug 03, 2009 at 12:04:53AM -0400, Brabhu Hansen wrote:
> Has any one tried using the ethernet over CAN for io-pkt?
>
> The existing code which i found is only for io-net. Can this be made run using shim library under ../sys/dev_qnx/shim? or a complete porting of npm-rawcan is needed
I'm not familiar with npm-rawcan but 'npm' suggests it's
a protocol module, not a driver. The shim handles drivers
so it probably won't work without some porting effort.
Regards,
-seanbSean Boudreau(deleted)2009-08-03T14:54:42Zpost35127: npm-rawcan ethernet driver
http://community.qnx.com/sf/go/post35127
Has any one tried using the ethernet over CAN for io-pkt?
The existing code which i found is only for io-net. Can this be made run using shim library under ../sys/dev_qnx/shim? or a complete porting of npm-rawcan is neededBrabhu Hansen2009-08-03T04:04:52Zpost35123: More strange behavior in libpcap
http://community.qnx.com/sf/go/post35123
While investigating "strange behavior of using pcap.h", I ran across another bit of strange behavior --- pcap_next (and also pcap_next_ex) frequently returns immediately with a timeout indication.
The code in pcap_read_bpf (in pcap-bpf.c) expects the byte count returned by BPF to be word aligned, but BPF inserts the alignment space BEFORE it adds a packet to the buffer, not AFTER it adds the packet. So the end of the buffer may not be word aligned. There are two tests in pcap_read_bpf to check for more data in the buffer: one of them, "if (p->cc == 0) {" tests a counter that gets decremented by the word aligned length of each packet --- a counter that will go negative at the end of the buffer three out of four times on random length data; the other test, "while (bp < ep) {" tests that the packet pointer hasn't been incremented past the end of the data. So, whenever the byte count from BPF is not word aligned, after the last packet is read from the buffer, the next call to pcap_next finds the counter negative, and since the test is for exactly zero, another read is NOT started, and the code goes on to loop through the packet; but the pointer test correctly determines that there are no more packets in the buffer, and returns no data, indicating a timeout.
There are several ways to correct this "problem", and the selection may be based more on politics than on technical issues. I would judge pcap_read_bpf, with its two different tests for the same condition, to be broken: a quick fix would be to change the p->cc == 0 test to p->cc <= 0. But I suppose others might argue that BPF should always return a word aligned value, and that should work too.
In any case, it's hard to imagine these false timeouts causing a serious problem in any application, but still, it's just not quite right.
MurfJohn Murphy2009-08-01T17:02:54Zpost35109: Re: Move from devn-mpc85xx.so to devnp-mpc85xx.so: how to keep the device name
http://community.qnx.com/sf/go/post35109
Hmmm... I seem to remember that this option was added in 6.4.1, so if you're on 6.4.0, it won't work.
http://community.qnx.com/integration/viewvc/viewvc.cgi?view=revision&root=core_networking&system=exsy1001&revision=670
Robert.Robert craig2009-07-31T20:06:09Zpost35077: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post35077
On Fri, Jul 31, 2009 at 12:40:49PM -0400, Yao Zhao wrote:
> >
> > Well done. It worked. I really appreciate. I am going to summarize the
> > discussion and make it more useful for anyone who may face the same problem.
> > Just one thing I wanna confirm, was replacing libpcap.a necessary or not.
> > Best Regards,
> > Mohammad
> >
>
> libpcap.a modification is not related to your timestamp problem so no.
The final I have in mind likely will require a new stack
and libpcap.
Regards,
-seanbSean Boudreau(deleted)2009-07-31T16:49:09Zpost35076: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post35076
> > > Yao Zhao wrote:
> > > >
> > > > Murf: can you get different timestamp for flood packets?
> > > >
> > > >
> > > >
> > > I get timestamps with the normal 8 us. resolution, as expected. The
> > > changes that were suggested for mtime will produce ms., not us.,
> > > resolution, since the hardware clock interrupts (approximately) once per
> > > millisecond.
> > >
> > > Murf
> >
> >
> > You should get 8ms resolution not 8us. as the tick.
> >
> > Murf is right I forgot qtime is updated by timer so curtime_nto won't get
> > better than 1 ms.
> > you should write a small program to call ClockPeriod to change system clock
> to
> > smaller, like 250us. then run your app.
>
>
> Well done. It worked. I really appreciate. I am going to summarize the
> discussion and make it more useful for anyone who may face the same problem.
> Just one thing I wanna confirm, was replacing libpcap.a necessary or not.
> Best Regards,
> Mohammad
>
>
>
> 12:12:13,165995 len:121
> 12:12:13,165995 len:121
> 12:12:13,165995 len:121
> 12:12:13,166206 len:121
> 12:12:13,166206 len:121
> 12:12:13,166336 len:121
> 12:12:13,166336 len:121
> 12:12:13,166538 len:121
> 12:12:13,166547 len:121
> 12:12:13,166547 len:121
> 12:12:13,166769 len:121
> 12:12:13,166769 len:121
> 12:12:13,166769 len:121
> 12:12:13,166990 len:121
> 12:12:13,166990 len:121
> 12:12:13,166990 len:121
> 12:12:13,166990 len:121
> 12:12:13,167211 len:121
> 12:12:13,167211 len:121
> 12:12:13,167322 len:121
> 12:12:13,167322 len:121
> 12:12:13,167543 len:121
> 12:12:13,167543 len:121
> 12:12:13,167543 len:121
> 12:12:13,167773 len:121
> 12:12:13,167773 len:121
> 12:12:13,167773 len:121
> 12:12:13,167773 len:121
> 12:12:13,167985 len:121
> 12:12:13,168004 len:121
> 12:12:13,168004 len:121
> 12:12:13,168217 len:121
> 12:12:13,168217 len:121
> 12:12:13,168327 len:121
> 12:12:13,168327 len:121
> 12:12:13,168539 len:121
> 12:12:13,168548 len:121
> 12:12:13,168548 len:121
> 12:12:13,168770 len:121
> 12:12:13,168770 len:121
> 12:12:13,168770 len:121
> 12:12:13,168991 len:121
> 12:12:13,168991 len:121
> 12:12:13,169212 len:121
> 12:12:13,169212 len:121
> 12:12:13,169323 len:121
> 12:12:13,169323 len:121
> 12:12:13,169534 len:121
> 12:12:13,169544 len:121
> 12:12:13,169544 len:121
> 12:12:13,169765 len:121
> 12:12:13,169765 len:121
> 12:12:13,169765 len:121
> 12:12:13,169986 len:121
libpcap.a modification is not related to your timestamp problem so no.Yao Zhao(deleted)2009-07-31T16:40:46Zpost35074: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post35074
> > Yao Zhao wrote:
> > >
> > > Murf: can you get different timestamp for flood packets?
> > >
> > >
> > >
> > I get timestamps with the normal 8 us. resolution, as expected. The
> > changes that were suggested for mtime will produce ms., not us.,
> > resolution, since the hardware clock interrupts (approximately) once per
> > millisecond.
> >
> > Murf
>
>
> You should get 8ms resolution not 8us. as the tick.
>
> Murf is right I forgot qtime is updated by timer so curtime_nto won't get
> better than 1 ms.
> you should write a small program to call ClockPeriod to change system clock to
> smaller, like 250us. then run your app.
Well done. It worked. I really appreciate. I am going to summarize the discussion and make it more useful for anyone who may face the same problem. Just one thing I wanna confirm, was replacing libpcap.a necessary or not.
Best Regards,
Mohammad
12:12:13,165995 len:121
12:12:13,165995 len:121
12:12:13,165995 len:121
12:12:13,166206 len:121
12:12:13,166206 len:121
12:12:13,166336 len:121
12:12:13,166336 len:121
12:12:13,166538 len:121
12:12:13,166547 len:121
12:12:13,166547 len:121
12:12:13,166769 len:121
12:12:13,166769 len:121
12:12:13,166769 len:121
12:12:13,166990 len:121
12:12:13,166990 len:121
12:12:13,166990 len:121
12:12:13,166990 len:121
12:12:13,167211 len:121
12:12:13,167211 len:121
12:12:13,167322 len:121
12:12:13,167322 len:121
12:12:13,167543 len:121
12:12:13,167543 len:121
12:12:13,167543 len:121
12:12:13,167773 len:121
12:12:13,167773 len:121
12:12:13,167773 len:121
12:12:13,167773 len:121
12:12:13,167985 len:121
12:12:13,168004 len:121
12:12:13,168004 len:121
12:12:13,168217 len:121
12:12:13,168217 len:121
12:12:13,168327 len:121
12:12:13,168327 len:121
12:12:13,168539 len:121
12:12:13,168548 len:121
12:12:13,168548 len:121
12:12:13,168770 len:121
12:12:13,168770 len:121
12:12:13,168770 len:121
12:12:13,168991 len:121
12:12:13,168991 len:121
12:12:13,169212 len:121
12:12:13,169212 len:121
12:12:13,169323 len:121
12:12:13,169323 len:121
12:12:13,169534 len:121
12:12:13,169544 len:121
12:12:13,169544 len:121
12:12:13,169765 len:121
12:12:13,169765 len:121
12:12:13,169765 len:121
12:12:13,169986 len:121Mohammad Dadashzadeh(deleted)2009-07-31T16:14:41Zpost35073: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post35073
>> I get timestamps with the normal 8 us. resolution, as expected. The
>> changes that were suggested for mtime will produce ms., not us.,
>> resolution, since the hardware clock interrupts (approximately) once per
>> millisecond.
>>
>> Murf
>>
>
>
> You should get 8ms resolution not 8us. as the tick.
>
> Murf is right I forgot qtime is updated by timer so curtime_nto won't get better than 1 ms.
> you should write a small program to call ClockPeriod to change system clock to smaller, like 250us. then run your app.
>
>
Yea, of course I meant 8ms., not 8us.! Even when I reread messages two
or three times before I hit the send button, I still make mistakes.
Guess I need a smarter "spell" checker....
MurfJohn Murphy2009-07-31T16:13:26Zpost35070: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post35070
> Yao Zhao wrote:
> >
> > Murf: can you get different timestamp for flood packets?
> >
> >
> >
> I get timestamps with the normal 8 us. resolution, as expected. The
> changes that were suggested for mtime will produce ms., not us.,
> resolution, since the hardware clock interrupts (approximately) once per
> millisecond.
>
> Murf
You should get 8ms resolution not 8us. as the tick.
Murf is right I forgot qtime is updated by timer so curtime_nto won't get better than 1 ms.
you should write a small program to call ClockPeriod to change system clock to smaller, like 250us. then run your app.Yao Zhao(deleted)2009-07-31T16:01:58Zpost35069: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post35069
Yao Zhao wrote:
>
> Murf: can you get different timestamp for flood packets?
>
>
>
I get timestamps with the normal 8 us. resolution, as expected. The
changes that were suggested for mtime will produce ms., not us.,
resolution, since the hardware clock interrupts (approximately) once per
millisecond.
MurfJohn Murphy2009-07-31T15:51:59Zpost35068: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post35068
I would really appreciate your help and support.Mohammad Dadashzadeh(deleted)2009-07-31T15:51:08Zpost35066: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post35066
Mohammad Dadashzadeh wrote:
>> Mohammad Dadashzadeh wrote:
>>
>>>>> I would like to get packets one by one. What should I do?
>>>>>
>>>>> Mohammad
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>> Sean sent you a libpcap.a that lets you enable immediate mode. That
>>>> should be all you need.
>>>>
>>>> Murf
>>>>
>>>>
>>> I did that, didn't work, even when I reboot my target machine it can not
>>>
>> connect to net anymore.
>>
>>> Mohammad
>>>
>>>
>> I compiled the code you published on this thread and linked it with
>> Sean's libpcap and it worked fine. I don't think we understand what you
>> mean by "not working".
>>
>> Murf
>>
>
>
> I replaced linpcap.a which Sean sent with all libpcap.a files in my development and target machine. I recompiled and built the project yet I am getting 8 packets every 1 ms while the packets are transmitted two every 250 usec.
>
> Regards,
> Mohammad
>
Sean's change was to enable immediate mode in BPF, and had nothing to do
with timestamps. You are seeing all the packets that get transmitted,
and, as has been explained several times in this thread, the resolution
of the timestamps you see on those packets is limited by the resolution
of the system clock. If you really think you need greater resolution on
the timestamps, it might be better to design you own packet capture
system, rather than make fundamental changes to the operating system,
especially by hacking the binaries.
By the way, please understand that I am in no way associated with QNX
other than being a happy user with about 30 years of experience in
packet sniffing --- and a little too much time on my hands this week.
MurfJohn Murphy2009-07-31T15:47:42Zpost35065: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post35065
> > > Mohammad Dadashzadeh wrote:
> > > >>> I would like to get packets one by one. What should I do?
> > > >>>
> > > >>> Mohammad
> > > >>>
> > > >>>
> > > >>>
> > > >>> _______________________________________________
> > > >>>
> > > >>>
> > > >>>
> > > >>>
> > > >> Sean sent you a libpcap.a that lets you enable immediate mode. That
> > > >> should be all you need.
> > > >>
> > > >> Murf
> > > >>
> > > >
> > > >
> > > > I did that, didn't work, even when I reboot my target machine it can
> not
> >
> > > connect to net anymore.
> > > >
> > > > Mohammad
> > > >
> > > I compiled the code you published on this thread and linked it with
> > > Sean's libpcap and it worked fine. I don't think we understand what you
> > > mean by "not working".
> > >
> > > Murf
> >
> >
> > I replaced linpcap.a which Sean sent with all libpcap.a files in my
> > development and target machine. I recompiled and built the project yet I am
>
> > getting 8 packets every 1 ms while the packets are transmitted two every 250
>
> > usec.
> >
> > Regards,
> > Mohammad
>
>
> You don't need to replace libpcap.a on target, it is only needed when you
> linking.
> Post the io-pkt-v4-hc you modified here and output of your application, if you
> modified correctly it should be stamped with microsecond, not millisecond.
> in bpf_deliver it will only call microtime once in a packet loop so that is
> another guess.
>
> Murf: can you get different timestamp for flood packets?
I do not know how to change d->bd_immediate to 1 in io-pkt-v4-hc. I attached my io-pkt-v4-hc
Regards,
MohammadMohammad Dadashzadeh(deleted)2009-07-31T15:45:47Zpost35064: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post35064
> > Mohammad Dadashzadeh wrote:
> > >>> I would like to get packets one by one. What should I do?
> > >>>
> > >>> Mohammad
> > >>>
> > >>>
> > >>>
> > >>> _______________________________________________
> > >>>
> > >>>
> > >>>
> > >>>
> > >> Sean sent you a libpcap.a that lets you enable immediate mode. That
> > >> should be all you need.
> > >>
> > >> Murf
> > >>
> > >
> > >
> > > I did that, didn't work, even when I reboot my target machine it can not
>
> > connect to net anymore.
> > >
> > > Mohammad
> > >
> > I compiled the code you published on this thread and linked it with
> > Sean's libpcap and it worked fine. I don't think we understand what you
> > mean by "not working".
> >
> > Murf
>
>
> I replaced linpcap.a which Sean sent with all libpcap.a files in my
> development and target machine. I recompiled and built the project yet I am
> getting 8 packets every 1 ms while the packets are transmitted two every 250
> usec.
>
> Regards,
> Mohammad
You don't need to replace libpcap.a on target, it is only needed when you linking.
Post the io-pkt-v4-hc you modified here and output of your application, if you modified correctly it should be stamped with microsecond, not millisecond.
in bpf_deliver it will only call microtime once in a packet loop so that is another guess.
Murf: can you get different timestamp for flood packets?Yao Zhao(deleted)2009-07-31T15:40:35Zpost35063: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post35063
> > >
> > > > I would like to get packets one by one. What should I do?
> > > >
> > > > Mohammad
> > > >
> > > >
> > > >
> > > > _______________________________________________
> > > >
> > > >
> > > >
> > > Sean sent you a libpcap.a that lets you enable immediate mode. That
> > > should be all you need.
> > >
> > > Murf
> >
> >
> > I did that, didn't work, even when I reboot my target machine it can not
> > connect to net anymore.
> >
> > Mohammad
>
>
> Don't panic.
> give me your source code(to make sure I can compile) and I can finish all for
> you. that will save all of us time.
Source code of packet capturing, it is attached.Mohammad Dadashzadeh(deleted)2009-07-31T15:40:23Zpost35062: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post35062
> > Mohammad Dadashzadeh wrote:
> > >>> I would like to get packets one by one. What should I do?
> > >>>
> > >>> Mohammad
> > >>>
> > >>>
> > >>>
> > >>> _______________________________________________
> > >>>
> > >>>
> > >>>
> > >>>
> > >> Sean sent you a libpcap.a that lets you enable immediate mode. That
> > >> should be all you need.
> > >>
> > >> Murf
> > >>
> > >
> > >
> > > I did that, didn't work, even when I reboot my target machine it can not
>
> > connect to net anymore.
> > >
> > > Mohammad
> > >
> > I compiled the code you published on this thread and linked it with
> > Sean's libpcap and it worked fine. I don't think we understand what you
> > mean by "not working".
> >
> > Murf
>
>
> I replaced linpcap.a which Sean sent with all libpcap.a files in my
> development and target machine. I recompiled and built the project yet I am
> getting 8 packets every 1 ms while the packets are transmitted two every 250
> usec.
>
> Regards,
> Mohammad
this is part of captured packets, compared to the packets shown in the first post I am getting 1 msec resolution. If I use Wireshark, it captures two packets almost every 250 msec.
Thanks
Mohammad
11:35:29,160460 len:121
11:35:29,160460 len:121
11:35:29,160460 len:121
11:35:29,160460 len:121
11:35:29,160460 len:121
11:35:29,160460 len:121
11:35:29,160460 len:121
11:35:29,160460 len:121
11:35:29,161459 len:121
11:35:29,161459 len:121
11:35:29,161459 len:121
11:35:29,161459 len:121
11:35:29,161459 len:121
11:35:29,161459 len:121
11:35:29,161459 len:121
11:35:29,161459 len:121
11:35:29,161459 len:121
11:35:29,161459 len:121
11:35:29,161459 len:121
11:35:29,161459 len:121
11:35:29,161459 len:121
11:35:29,161459 len:121
11:35:29,162460 len:121
11:35:29,162460 len:121
11:35:29,162460 len:121
11:35:29,162460 len:121
11:35:29,162460 len:121
11:35:29,162460 len:121
11:35:29,162460 len:121
11:35:29,162460 len:121
11:35:29,162460 len:121
11:35:29,162460 len:121
11:35:29,162460 len:121
11:35:29,162460 len:121
11:35:29,162460 len:121
11:35:29,162460 len:121
11:35:29,163459 len:121
11:35:29,163459 len:121
11:35:29,163459 len:121
11:35:29,163459 len:121
11:35:29,163459 len:121
11:35:29,163459 len:121
11:35:29,163459 len:121
11:35:29,163459 len:121
11:35:29,163459 len:121
11:35:29,163459 len:121
11:35:29,163459 len:121
11:35:29,163459 len:121
11:35:29,163459 len:121
11:35:29,163459 len:121
11:35:29,164460 len:121
11:35:29,164460 len:121
11:35:29,164460 len:121
11:35:29,164460 len:121Mohammad Dadashzadeh(deleted)2009-07-31T15:36:29Zpost35061: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post35061
> Mohammad Dadashzadeh wrote:
> >>> I would like to get packets one by one. What should I do?
> >>>
> >>> Mohammad
> >>>
> >>>
> >>>
> >>> _______________________________________________
> >>>
> >>>
> >>>
> >>>
> >> Sean sent you a libpcap.a that lets you enable immediate mode. That
> >> should be all you need.
> >>
> >> Murf
> >>
> >
> >
> > I did that, didn't work, even when I reboot my target machine it can not
> connect to net anymore.
> >
> > Mohammad
> >
> I compiled the code you published on this thread and linked it with
> Sean's libpcap and it worked fine. I don't think we understand what you
> mean by "not working".
>
> Murf
I replaced linpcap.a which Sean sent with all libpcap.a files in my development and target machine. I recompiled and built the project yet I am getting 8 packets every 1 ms while the packets are transmitted two every 250 usec.
Regards,
MohammadMohammad Dadashzadeh(deleted)2009-07-31T15:28:06Zpost35060: Re: RE: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post35060
On Fri, Jul 31, 2009 at 10:01:17AM -0400, Yao Zhao wrote:
> > I would like to get packets one by one. What should I do?
> >
> > Mohammad
>
>
> take a look at source of pcap_open_live, in pcap_open_live there is code for AIX how to call if (ioctl(p->fd, BIOCIMMEDIATE, &v) < 0) {
> snprintf(ebuf, PCAP_ERRBUF_SIZE, "BIOCIMMEDIATE: %s",
> pcap_strerror(errno));
> goto bad;
> }
> you need to find out how to get fd.
>
> another way probably you are ok now: still hack io-pkt-v4-hc,
> if (d->bd_immediate || d->bd_state == BPF_TIMED_OUT)
> /*
> * Immediate mode is set, or the read timeout has
> * already expired during a select call. A packet
> * arrived, so the reader should be woken up.
> */
> bpf_wakeup(d);
> }
>
> disassembly io-pkt-v4-hc's catchpacket, change d->bd_immediate to 1 then you will always get packet one by one.
> default it won't be set in pcap_open_alive as it is fox AIX.
You can get the fd with pcap_fileno(), but I'm not convinced
anymore that he want's to get packets one at a time. I think
he's worried about the timestamp...
-seanbSean Boudreau(deleted)2009-07-31T15:27:01Zpost35059: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post35059
Mohammad Dadashzadeh wrote:
>>> I would like to get packets one by one. What should I do?
>>>
>>> Mohammad
>>>
>>>
>>>
>>> _______________________________________________
>>>
>>>
>>>
>>>
>> Sean sent you a libpcap.a that lets you enable immediate mode. That
>> should be all you need.
>>
>> Murf
>>
>
>
> I did that, didn't work, even when I reboot my target machine it can not connect to net anymore.
>
> Mohammad
>
I compiled the code you published on this thread and linked it with
Sean's libpcap and it worked fine. I don't think we understand what you
mean by "not working".
MurfJohn Murphy2009-07-31T15:24:14Zpost35058: Re: RE: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post35058
I just installed QNX few days ago and I have not changed anything, I think the source is untouched and available in the QNX website. Am I right?
Thanks alot,
MohammadMohammad Dadashzadeh(deleted)2009-07-31T15:23:18Zpost35056: RE: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post35056
> -----Original Message-----
> From: Yao Zhao [mailto:community-noreply@qnx.com]
> Sent: Friday, July 31, 2009 11:19 AM
> To: ionetmig-networking
> Subject: Re: strange behavior of using pcap.h
>
> > >
> > > > I would like to get packets one by one. What should I do?
> > > >
> > > > Mohammad
> > > >
> > > >
> > > >
> > > > _______________________________________________
> > > >
> > > >
> > > >
> > > Sean sent you a libpcap.a that lets you enable immediate mode.
> That
> > > should be all you need.
> > >
> > > Murf
> >
> >
> > I did that, didn't work, even when I reboot my target machine it can
> not
> > connect to net anymore.
> >
> > Mohammad
>
>
> Don't panic.
> give me your source code(to make sure I can compile) and I can finish
> all for you. that will save all of us time.
I also have some source code that need fixing, can I send it to you?
>
>
>
> _______________________________________________
>
> io-net migration
> http://community.qnx.com/sf/go/post35055
>Mario Charest2009-07-31T15:19:35Zpost35055: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post35055
> >
> > > I would like to get packets one by one. What should I do?
> > >
> > > Mohammad
> > >
> > >
> > >
> > > _______________________________________________
> > >
> > >
> > >
> > Sean sent you a libpcap.a that lets you enable immediate mode. That
> > should be all you need.
> >
> > Murf
>
>
> I did that, didn't work, even when I reboot my target machine it can not
> connect to net anymore.
>
> Mohammad
Don't panic.
give me your source code(to make sure I can compile) and I can finish all for you. that will save all of us time.Yao Zhao(deleted)2009-07-31T15:18:33Zpost35050: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post35050
>
> > I would like to get packets one by one. What should I do?
> >
> > Mohammad
> >
> >
> >
> > _______________________________________________
> >
> >
> >
> Sean sent you a libpcap.a that lets you enable immediate mode. That
> should be all you need.
>
> Murf
I did that, didn't work, even when I reboot my target machine it can not connect to net anymore.
MohammadMohammad Dadashzadeh(deleted)2009-07-31T15:02:39Zpost35044: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post35044
In this case I have to recompile io-pkt, am I write, I am not familiar with this procedure, any way to hack io-pkt-v4-hc
why this is not optional in QNX, so user can determine what they want.
Regards,
MohammadMohammad Dadashzadeh(deleted)2009-07-31T14:46:43Zpost35043: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post35043
On Fri, Jul 31, 2009 at 10:12:06AM -0400, John Murphy wrote:
>
> > I would like to get packets one by one. What should I do?
> >
> > Mohammad
> >
> >
> >
> > _______________________________________________
> >
> >
> >
> Sean sent you a libpcap.a that lets you enable immediate mode. That
> should be all you need.
>
I think that's the confusion in this thread. I think Mohammad's
under the impression that the timestamp in the packet is when
he's actually getting it. I'm not convinced anyore that the wait
on the read() is the concern. If the timestamp on the packet
is the primary sticking point the attached diff will get the
resolution of the system clock which by default is 1ms. The
system clock can then be changed with ClockPeriod() but I suspect
32us will be too much overhead.
Regards,
-seanbSean Boudreau(deleted)2009-07-31T14:41:59Zpost35029: Re: RE: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post35029
So the easiest way is to disassemble io-pkt-v4-hc's catchpacket, change d->bd_immediate to 1 then I will always get packet one by one.
How can I disassemble io-pkt-v4-hc. Is there any software which can do the job for me.
I am attaching my io-pkt-v4-hc. Could you do me a favor and change d->bd_immediate to 1. I think after this I am done and I can verify QNX for may application.
Regards
MohammadMohammad Dadashzadeh(deleted)2009-07-31T14:13:02Zpost35028: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post35028
> I would like to get packets one by one. What should I do?
>
> Mohammad
>
>
>
> _______________________________________________
>
>
>
Sean sent you a libpcap.a that lets you enable immediate mode. That
should be all you need.
MurfJohn Murphy2009-07-31T14:12:03Zpost35026: Re: RE: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post35026
> I would like to get packets one by one. What should I do?
>
> Mohammad
take a look at source of pcap_open_live, in pcap_open_live there is code for AIX how to call if (ioctl(p->fd, BIOCIMMEDIATE, &v) < 0) {
snprintf(ebuf, PCAP_ERRBUF_SIZE, "BIOCIMMEDIATE: %s",
pcap_strerror(errno));
goto bad;
}
you need to find out how to get fd.
another way probably you are ok now: still hack io-pkt-v4-hc,
if (d->bd_immediate || d->bd_state == BPF_TIMED_OUT)
/*
* Immediate mode is set, or the read timeout has
* already expired during a select call. A packet
* arrived, so the reader should be woken up.
*/
bpf_wakeup(d);
}
disassembly io-pkt-v4-hc's catchpacket, change d->bd_immediate to 1 then you will always get packet one by one.
default it won't be set in pcap_open_alive as it is fox AIX.
/*
* Move the packet data from interface memory (pkt) into the
* store buffer. Return 1 if it's time to wakeup a listener (buffer full),
* otherwise 0. "copy" is the routine called to do the actual data
* transfer. memcpy is passed in to copy contiguous chunks, while
* bpf_mcpy is passed in to copy mbuf chains. In the latter case,
* pkt is really an mbuf.
*/
static void
catchpacket(struct bpf_d *d, u_char *pkt, u_int pktlen, u_int snaplen,
void *(*cpfn)(void *, const void *, size_t), struct timeval *tv)
{
struct bpf_hdr *hp;
int totlen, curlen;
int hdrlen = d->bd_bif->bif_hdrlen;
++d->bd_ccount;
++bpf_gstats.bs_capt;
/*
* Figure out how many bytes to move. If the packet is
* greater or equal to the snapshot length, transfer that
* much. Otherwise, transfer the whole packet (unless
* we hit the buffer size limit).
*/
totlen = hdrlen + min(snaplen, pktlen);
if (totlen > d->bd_bufsize)
totlen = d->bd_bufsize;
/*
* Round up the end of the previous packet to the next longword.
*/
curlen = BPF_WORDALIGN(d->bd_slen);
if (curlen + totlen > d->bd_bufsize) {
/*
* This packet will overflow the storage buffer.
* Rotate the buffers if we can, then wakeup any
* pending reads.
*/
if (d->bd_fbuf == 0) {
/*
* We haven't completed the previous read yet,
* so drop the packet.
*/
++d->bd_dcount;
++bpf_gstats.bs_drop;
return;
}
ROTATE_BUFFERS(d);
bpf_wakeup(d);
curlen = 0;
}
/*
* Append the bpf header.
*/
hp = (struct bpf_hdr *)(d->bd_sbuf + curlen);
hp->bh_tstamp = *tv;
hp->bh_datalen = pktlen;
hp->bh_hdrlen = hdrlen;
/*
* Copy the packet data into the store buffer and update its length.
*/
(*cpfn)((u_char *)hp + hdrlen, pkt, (hp->bh_caplen = totlen - hdrlen));
d->bd_slen = curlen + totlen;
/*
* Call bpf_wakeup after bd_slen has been updated so that kevent(2)
* will cause filt_bpfread() to be called with it adjusted.
*/
if (d->bd_immediate || d->bd_state == BPF_TIMED_OUT)
/*
* Immediate mode is set, or the read timeout has
* already expired during a select call. A packet
* arrived, so the reader should be woken up.
*/
bpf_wakeup(d);
}
I suggest you read source as it is not difficult. that is why open source is popular and we publish source code.Yao Zhao(deleted)2009-07-31T14:01:12Zpost35016: Re: RE: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post35016
I would like to get packets one by one. What should I do?
MohammadMohammad Dadashzadeh(deleted)2009-07-31T13:30:27Zpost34965: Re: RE: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34965
I learned how to hack io-pkt-v4-hc now the accuracy is 1msec, I am getting 8 packets per 1 msec
How can I reduce that to 100usec or less
Thanks,
MohammadMohammad Dadashzadeh(deleted)2009-07-30T20:38:37Zpost34962: Re: RE: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34962
when I run pidin arg|grep io-pkt* it responses
114708 io-pkt-v4-hc -ptcpip
1220648 io-pkt*
now am I using io-pkt-v4-hc?
if yes, should I replace hacked version (io-pkt-v4) with (io-pkt-v4-hc) or with io-pkt-hc
or should we hack io-pkt-v4-hc
Regards,
MohammadMohammad Dadashzadeh(deleted)2009-07-30T19:28:14Zpost34960: Re: RE: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34960
it is hacked then run this on your qnx target.
run "pidin arg|grep io-pkt*" on your target find which io-pkt you are using and make sure you are replace it with this io-pkt-v4 not others.
keep a copy!Yao Zhao(deleted)2009-07-30T19:11:49Zpost34959: Re: RE: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34959
there are two more similar files
io-pkt-v4-hc
io-pkt-v6-hc
I could not find below in these files
0805ca45 <mtime>:
805ca45: 55 push %ebp
805ca46: 89 e5 mov %esp,%ebp
805ca48: 83 ec 28 sub $0x28,%esp
805ca4b: 89 5d f4 mov %ebx,-0xc(%ebp)
805ca4e: 89 75 f8 mov %esi,-0x8(%ebp)
805ca51: 89 7d fc mov %edi,-0x4(%ebp)
805ca54: 89 cf mov %ecx,%edi
805ca56: 85 d2 test %edx,%edx
805ca58: 0f 94 c0 sete %al
805ca5b: 0f b6 c0 movzbl %al,%eax
805ca5e: 89 04 24 mov %eax,(%esp)
805ca61: e8 a0 fe ff ff call 805c906 <currtime_nto>
805ca66: 89 c3 mov %eax,%ebx
805ca68: 81 e3 00 00 80 ff and $0xff800000,%ebx
805ca6e: 89 d6 mov %edx,%esi
805ca70: 8b 15 4c 63 0c 08 mov 0x80c634c,%edx
805ca76: 31 f2 xor %esi,%edx
805ca78: a1 48 63 0c 08 mov 0x80c6348,%eax
805ca7d: 31 d8 xor %ebx,%eax
805ca7f: 09 c2 or %eax,%edx
805ca81: 74 6a je 805caed <mtime+0xa8>
0805ca45 <mtime>:
805ca45: 55 push %ebp
805ca46: 89 e5 mov %esp,%ebp
805ca48: 83 ec 28 sub $0x28,%esp
805ca4b: 89 5d f4 mov %ebx,-0xc(%ebp)
805ca4e: 89 75 f8 mov %esi,-0x8(%ebp)
805ca51: 89 7d fc mov %edi,-0x4(%ebp)
805ca54: 89 cf mov %ecx,%edi
805ca56: 85 d2 test %edx,%edx
805ca58: 0f 94 c0 sete %al
805ca5b: 0f b6 c0 movzbl %al,%eax
805ca5e: 89 04 24 mov %eax,(%esp)
805ca61: e8 a0 fe ff ff call 805c906 <currtime_nto>
805ca66: 89 c3 mov %eax,%ebx
805ca68: 81 e3 00 00 80 ff and $0xff800000,%ebx
805ca6e: 89 d6 mov %edx,%esi
805ca70: 8b 15 4c 63 0c 08 mov 0x80c634c,%edx
805ca76: 31 f2 xor %esi,%edx
805ca78: a1 48 63 0c 08 mov 0x80c6348,%eax
805ca7d: 31 d8 xor %ebx,%eax
805ca7f: 09 c2 or %eax,%edx
805ca81: 74 6a je 805caed <mtime+0xa8>Mohammad Dadashzadeh(deleted)2009-07-30T18:53:02Zpost34957: Re: RE: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34957
I am using xvi32 to open the file it finds one mtime but the codes around it is completely different than what you mentioned above. I attached the file. Could you please modify this and send it for me.
Regards,
MohammadMohammad Dadashzadeh(deleted)2009-07-30T18:31:59Zpost34955: Re: RE: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34955
What software can open the file so I can edit it.
Thanks
MohammadMohammad Dadashzadeh(deleted)2009-07-30T18:21:20Zpost34949: Re: RE: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34949
> Should I sreach my QNX nto machine or development machine. In which file
> should I exactly search
>
> Regards,
> Mohammad
If you mean source code then take a look the source tree: trunk/sys/current_time.c or tags/GA/6.4.0/sys...
if you mean binary, I refer io-pkt-v4. On you development machine, ntox86-objdump -d $QNX_TARGET/x86/sbin/io-pkt-v4 to find <mtime>: If you can do this on your nto machine(target?) it would be better.Yao Zhao(deleted)2009-07-30T17:32:44Zpost34944: Re: RE: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34944
Should I sreach my QNX nto machine or development machine. In which file should I exactly search
Regards,
MohammadMohammad Dadashzadeh(deleted)2009-07-30T17:13:00Zpost34942: Re: RE: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34942
> > 0805ca45 <mtime>:
> > 805ca45: 55 push %ebp
> > 805ca46: 89 e5 mov %esp,%ebp
> > 805ca48: 83 ec 28 sub $0x28,%esp
> > 805ca4b: 89 5d f4 mov %ebx,-0xc(%ebp)
> > 805ca4e: 89 75 f8 mov %esi,-0x8(%ebp)
> > 805ca51: 89 7d fc mov %edi,-0x4(%ebp)
> > 805ca54: 89 cf mov %ecx,%edi
> > 805ca56: 85 d2 test %edx,%edx
> > 805ca58: 0f 94 c0 sete %al
> > 805ca5b: 0f b6 c0 movzbl %al,%eax
> > 805ca5e: 89 04 24 mov %eax,(%esp)
> > 805ca61: e8 a0 fe ff ff call 805c906 <currtime_nto>
> > 805ca66: 89 c3 mov %eax,%ebx
> > 805ca68: 81 e3 00 00 80 ff and $0xff800000,%ebx
> > 805ca6e: 89 d6 mov %edx,%esi
> > 805ca70: 8b 15 4c 63 0c 08 mov 0x80c634c,%edx
> > 805ca76: 31 f2 xor %esi,%edx
> > 805ca78: a1 48 63 0c 08 mov 0x80c6348,%eax
> > 805ca7d: 31 d8 xor %ebx,%eax
> > 805ca7f: 09 c2 or %eax,%edx
> > 805ca81: 74 6a je 805caed <mtime+0xa8>
> > 0805ca45 <mtime>:
> > 805ca45: 55 push %ebp
> > 805ca46: 89 e5 mov %esp,%ebp
> > 805ca48: 83 ec 28 sub $0x28,%esp
> > 805ca4b: 89 5d f4 mov %ebx,-0xc(%ebp)
> > 805ca4e: 89 75 f8 mov %esi,-0x8(%ebp)
> > 805ca51: 89 7d fc mov %edi,-0x4(%ebp)
> > 805ca54: 89 cf mov %ecx,%edi
> > 805ca56: 85 d2 test %edx,%edx
> > 805ca58: 0f 94 c0 sete %al
> > 805ca5b: 0f b6 c0 movzbl %al,%eax
> > 805ca5e: 89 04 24 mov %eax,(%esp)
> > 805ca61: e8 a0 fe ff ff call 805c906 <currtime_nto>
> > 805ca66: 89 c3 mov %eax,%ebx
> > 805ca68: 81 e3 00 00 80 ff and $0xff800000,%ebx
> > 805ca6e: 89 d6 mov %edx,%esi
> > 805ca70: 8b 15 4c 63 0c 08 mov 0x80c634c,%edx
> > 805ca76: 31 f2 xor %esi,%edx
> > 805ca78: a1 48 63 0c 08 mov 0x80c6348,%eax
> > 805ca7d: 31 d8 xor %ebx,%eax
> > 805ca7f: 09 c2 or %eax,%edx
> > 805ca81: 74 6a je 805caed <mtime+0xa8>
> >
> > Here curtick = cur & ~((1 << NTO_TSHIFT) -1); so it is rounding to tick.
> > You can change it to curtick = cur & ~(1024-1) then you will get microsend precision not tick any more.
> > so hack io-pkt-*(you don't need to recompile) and find the address
> > 805ca68: 81 e3 00 00 80 ff and $0xff800000,%ebx
> > and change 00 00 80 ff to 0xfffffc00(00 fc ff ff)
> >
> > static void
> > mtime(int get, int up, struct timeval *tv)
> > {
> > static uint64_t mtlast;
> > static struct timeval mt_tv;
> > uint64_t cur, curtick;
> >
> > /*
> > * See comments in <sys/timevar.h>. 'get' variants
> > * are allowed to return a less precise result.
> > */
> >
> > cur = currtime_nto(!up);
> > curtick = cur & ~((1 << NTO_TSHIFT) -1);
> >
> > if (1 /* get */) {
> > /*
> > * Try to only do the 64 bit division every tick.
> > * Makes microtime() not so micro...
> > */
> > if (mtlast != curtick) {
> > mtlast = curtick;
> > mt_tv.tv_sec = mtlast / 1000000000;
> > mt_tv.tv_usec = (mtlast % 1000000000) / 1000;
> > }
> > }
> > else {
> > mtlast = curtick;
> > mt_tv.tv_sec = cur / 1000000000;
> > mt_tv.tv_usec = (cur % 1000000000) / 1000;
> > }
>
>
> I am bigginer, In which file I can file this assembly code?
> Mohammad
>
if you want to recompile: it is in io-pkt's source tree: sys/current_time.c:mtime.
if you don't know about elf format, then use a hex editor to search machine code, if you only find once then you find it, if not then search longer machine code.
> > 805ca5e: 89 04 24 mov %eax,(%esp)
> > 805ca61: e8 a0 fe ff ff call 805c906 <currtime_nto>
> > 805ca66: 89 c3 mov %eax,%ebx
> > 805ca68: 81 e3 00 00 80 ff and $0xff800000,%ebx
> > 805ca6e: 89 d6 mov %edx,%esi
> > 805ca70: 8b 15 4c 63 0c 08 mov 0x80c634c,%edx
> > 805ca76: 31 f2 xor %esi,%edx
> > 805ca78: a1 48 63 0c 08 mov 0x80c6348,%eaxYao Zhao(deleted)2009-07-30T16:58:52Zpost34939: Re: RE: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34939
Where can I find this mtime function to modify it?
MohammadMohammad Dadashzadeh(deleted)2009-07-30T16:45:08Zpost34936: Re: RE: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34936
> 0805ca45 <mtime>:
> 805ca45: 55 push %ebp
> 805ca46: 89 e5 mov %esp,%ebp
> 805ca48: 83 ec 28 sub $0x28,%esp
> 805ca4b: 89 5d f4 mov %ebx,-0xc(%ebp)
> 805ca4e: 89 75 f8 mov %esi,-0x8(%ebp)
> 805ca51: 89 7d fc mov %edi,-0x4(%ebp)
> 805ca54: 89 cf mov %ecx,%edi
> 805ca56: 85 d2 test %edx,%edx
> 805ca58: 0f 94 c0 sete %al
> 805ca5b: 0f b6 c0 movzbl %al,%eax
> 805ca5e: 89 04 24 mov %eax,(%esp)
> 805ca61: e8 a0 fe ff ff call 805c906 <currtime_nto>
> 805ca66: 89 c3 mov %eax,%ebx
> 805ca68: 81 e3 00 00 80 ff and $0xff800000,%ebx
> 805ca6e: 89 d6 mov %edx,%esi
> 805ca70: 8b 15 4c 63 0c 08 mov 0x80c634c,%edx
> 805ca76: 31 f2 xor %esi,%edx
> 805ca78: a1 48 63 0c 08 mov 0x80c6348,%eax
> 805ca7d: 31 d8 xor %ebx,%eax
> 805ca7f: 09 c2 or %eax,%edx
> 805ca81: 74 6a je 805caed <mtime+0xa8>
> 0805ca45 <mtime>:
> 805ca45: 55 push %ebp
> 805ca46: 89 e5 mov %esp,%ebp
> 805ca48: 83 ec 28 sub $0x28,%esp
> 805ca4b: 89 5d f4 mov %ebx,-0xc(%ebp)
> 805ca4e: 89 75 f8 mov %esi,-0x8(%ebp)
> 805ca51: 89 7d fc mov %edi,-0x4(%ebp)
> 805ca54: 89 cf mov %ecx,%edi
> 805ca56: 85 d2 test %edx,%edx
> 805ca58: 0f 94 c0 sete %al
> 805ca5b: 0f b6 c0 movzbl %al,%eax
> 805ca5e: 89 04 24 mov %eax,(%esp)
> 805ca61: e8 a0 fe ff ff call 805c906 <currtime_nto>
> 805ca66: 89 c3 mov %eax,%ebx
> 805ca68: 81 e3 00 00 80 ff and $0xff800000,%ebx
> 805ca6e: 89 d6 mov %edx,%esi
> 805ca70: 8b 15 4c 63 0c 08 mov 0x80c634c,%edx
> 805ca76: 31 f2 xor %esi,%edx
> 805ca78: a1 48 63 0c 08 mov 0x80c6348,%eax
> 805ca7d: 31 d8 xor %ebx,%eax
> 805ca7f: 09 c2 or %eax,%edx
> 805ca81: 74 6a je 805caed <mtime+0xa8>
>
> Here curtick = cur & ~((1 << NTO_TSHIFT) -1); so it is rounding to tick.
> You can change it to curtick = cur & ~(1024-1) then you will get microsend precision not tick any more.
> so hack io-pkt-*(you don't need to recompile) and find the address
> 805ca68: 81 e3 00 00 80 ff and $0xff800000,%ebx
> and change 00 00 80 ff to 0xfffffc00(00 fc ff ff)
>
> static void
> mtime(int get, int up, struct timeval *tv)
> {
> static uint64_t mtlast;
> static struct timeval mt_tv;
> uint64_t cur, curtick;
>
> /*
> * See comments in <sys/timevar.h>. 'get' variants
> * are allowed to return a less precise result.
> */
>
> cur = currtime_nto(!up);
> curtick = cur & ~((1 << NTO_TSHIFT) -1);
>
> if (1 /* get */) {
> /*
> * Try to only do the 64 bit division every tick.
> * Makes microtime() not so micro...
> */
> if (mtlast != curtick) {
> mtlast = curtick;
> mt_tv.tv_sec = mtlast / 1000000000;
> mt_tv.tv_usec = (mtlast % 1000000000) / 1000;
> }
> }
> else {
> mtlast = curtick;
> mt_tv.tv_sec = cur / 1000000000;
> mt_tv.tv_usec = (cur % 1000000000) / 1000;
> }
I am bigginer, In which file I can file this assembly code?
MohammadMohammad Dadashzadeh(deleted)2009-07-30T16:34:55Zpost34935: Re: RE: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34935
Or change the 'if (1 /* get */)' to 'if (get)'.
>
> Here curtick = cur & ~((1 << NTO_TSHIFT) -1); so it is rounding to tick.
> You can change it to curtick = cur & ~(1024-1) then you will get microsend precision not tick any more.
> so hack io-pkt-*(you don't need to recompile) and find the address
> 805ca68: 81 e3 00 00 80 ff and $0xff800000,%ebx
> and change 00 00 80 ff to 0xfffffc00(00 fc ff ff)
>
> static void
> mtime(int get, int up, struct timeval *tv)
> {
> static uint64_t mtlast;
> static struct timeval mt_tv;
> uint64_t cur, curtick;
>
> /*
> * See comments in <sys/timevar.h>. 'get' variants
> * are allowed to return a less precise result.
> */
>
> cur = currtime_nto(!up);
> curtick = cur & ~((1 << NTO_TSHIFT) -1);
>
> if (1 /* get */) {
> /*
> * Try to only do the 64 bit division every tick.
> * Makes microtime() not so micro...
> */
> if (mtlast != curtick) {
> mtlast = curtick;
> mt_tv.tv_sec = mtlast / 1000000000;
> mt_tv.tv_usec = (mtlast % 1000000000) / 1000;
> }
> }
> else {
> mtlast = curtick;
> mt_tv.tv_sec = cur / 1000000000;
> mt_tv.tv_usec = (cur % 1000000000) / 1000;
> }
>
>
>
>
> _______________________________________________
>
> io-net migration
> http://community.qnx.com/sf/go/post34926
>Sean Boudreau(deleted)2009-07-30T16:25:33Zpost34926: Re: RE: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34926
0805ca45 <mtime>:
805ca45: 55 push %ebp
805ca46: 89 e5 mov %esp,%ebp
805ca48: 83 ec 28 sub $0x28,%esp
805ca4b: 89 5d f4 mov %ebx,-0xc(%ebp)
805ca4e: 89 75 f8 mov %esi,-0x8(%ebp)
805ca51: 89 7d fc mov %edi,-0x4(%ebp)
805ca54: 89 cf mov %ecx,%edi
805ca56: 85 d2 test %edx,%edx
805ca58: 0f 94 c0 sete %al
805ca5b: 0f b6 c0 movzbl %al,%eax
805ca5e: 89 04 24 mov %eax,(%esp)
805ca61: e8 a0 fe ff ff call 805c906 <currtime_nto>
805ca66: 89 c3 mov %eax,%ebx
805ca68: 81 e3 00 00 80 ff and $0xff800000,%ebx
805ca6e: 89 d6 mov %edx,%esi
805ca70: 8b 15 4c 63 0c 08 mov 0x80c634c,%edx
805ca76: 31 f2 xor %esi,%edx
805ca78: a1 48 63 0c 08 mov 0x80c6348,%eax
805ca7d: 31 d8 xor %ebx,%eax
805ca7f: 09 c2 or %eax,%edx
805ca81: 74 6a je 805caed <mtime+0xa8>
0805ca45 <mtime>:
805ca45: 55 push %ebp
805ca46: 89 e5 mov %esp,%ebp
805ca48: 83 ec 28 sub $0x28,%esp
805ca4b: 89 5d f4 mov %ebx,-0xc(%ebp)
805ca4e: 89 75 f8 mov %esi,-0x8(%ebp)
805ca51: 89 7d fc mov %edi,-0x4(%ebp)
805ca54: 89 cf mov %ecx,%edi
805ca56: 85 d2 test %edx,%edx
805ca58: 0f 94 c0 sete %al
805ca5b: 0f b6 c0 movzbl %al,%eax
805ca5e: 89 04 24 mov %eax,(%esp)
805ca61: e8 a0 fe ff ff call 805c906 <currtime_nto>
805ca66: 89 c3 mov %eax,%ebx
805ca68: 81 e3 00 00 80 ff and $0xff800000,%ebx
805ca6e: 89 d6 mov %edx,%esi
805ca70: 8b 15 4c 63 0c 08 mov 0x80c634c,%edx
805ca76: 31 f2 xor %esi,%edx
805ca78: a1 48 63 0c 08 mov 0x80c6348,%eax
805ca7d: 31 d8 xor %ebx,%eax
805ca7f: 09 c2 or %eax,%edx
805ca81: 74 6a je 805caed <mtime+0xa8>
Here curtick = cur & ~((1 << NTO_TSHIFT) -1); so it is rounding to tick.
You can change it to curtick = cur & ~(1024-1) then you will get microsend precision not tick any more.
so hack io-pkt-*(you don't need to recompile) and find the address
805ca68: 81 e3 00 00 80 ff and $0xff800000,%ebx
and change 00 00 80 ff to 0xfffffc00(00 fc ff ff)
static void
mtime(int get, int up, struct timeval *tv)
{
static uint64_t mtlast;
static struct timeval mt_tv;
uint64_t cur, curtick;
/*
* See comments in <sys/timevar.h>. 'get' variants
* are allowed to return a less precise result.
*/
cur = currtime_nto(!up);
curtick = cur & ~((1 << NTO_TSHIFT) -1);
if (1 /* get */) {
/*
* Try to only do the 64 bit division every tick.
* Makes microtime() not so micro...
*/
if (mtlast != curtick) {
mtlast = curtick;
mt_tv.tv_sec = mtlast / 1000000000;
mt_tv.tv_usec = (mtlast % 1000000000) / 1000;
}
}
else {
mtlast = curtick;
mt_tv.tv_sec = cur / 1000000000;
mt_tv.tv_usec = (cur % 1000000000) / 1000;
}Yao Zhao(deleted)2009-07-30T15:44:56Zpost34869: Re: Move from devn-mpc85xx.so to devnp-mpc85xx.so: how to keep the
device name
http://community.qnx.com/sf/go/post34869
Hi Sean,
This is how I invoke it
# /sbin/io-pkt-v4 -p tcpip rx_prio=250
# mount -T io-pkt -o "mac=04000000002a,verbose=10" /home/schen/devnp-mpc85xx.so
I am not sure what I did wrong, I tried both ways, both not work
# /sbin/io-pkt-v4 -p tcpip rx_prio=250 name=en
=> does not work
# mount -T io-pkt -o "mac=04000000002a,name=en,verbose=10" /home/schen/devnp-mpc85xx.so
mount: Can't mount / (type io-pkt)
mount: Possible reason: Invalid argument
Regards,
SherrySherry Chen2009-07-30T03:22:35Zpost34866: Re: Move from devn-mpc85xx.so to devnp-mpc85xx.so: how to keep the
device name
http://community.qnx.com/sf/go/post34866
On Wed, Jul 29, 2009 at 10:35:20PM -0400, Sherry Chen wrote:
> Hi,
>
> I am migrating from io-net/shim/devn-mpc85xx.so to io-pkt/devnp-mpc85xx.so
>
>
> #1 For io-net the device names en0, en1, en2, en3
> #2 To open device /dev/io-net/en0 ... etc
>
> #3 For io-pkt the device names tsec0, tsec1, ..
>
> Question:
> #4 how to tell io-pkt to use the same name convention, so that both #1 and #2 will work.
> #5 If #4 is not possible, I do I open device for #3
> I could not find /dev/tsec0 or /dev/io-pkt/tsec0
>
>
You can change the name with the 'name=foo' option to the driver:
io-pkt -d tsec name=foo
Native drivers don't put entries in the namespace as mentioned here:
http://community.qnx.com/sf/wiki/do/viewPage/projects.networking/wiki/IoNet_migration
What do you want to do on /dev/io-net/foo? There's
probably another method.
Regards,
-seanbSean Boudreau(deleted)2009-07-30T02:45:54Zpost34865: Move from devn-mpc85xx.so to devnp-mpc85xx.so: how to keep the device name
http://community.qnx.com/sf/go/post34865
Hi,
I am migrating from io-net/shim/devn-mpc85xx.so to io-pkt/devnp-mpc85xx.so
#1 For io-net the device names en0, en1, en2, en3
#2 To open device /dev/io-net/en0 ... etc
#3 For io-pkt the device names tsec0, tsec1, ..
Question:
#4 how to tell io-pkt to use the same name convention, so that both #1 and #2 will work.
#5 If #4 is not possible, I do I open device for #3
I could not find /dev/tsec0 or /dev/io-pkt/tsec0
Appreciate a quick answer.
Thanks,
SherrySherry Chen2009-07-30T02:35:19Zpost34855: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34855
> > On Wed, Jul 29, 2009 at 03:46:36PM -0400, Mohammad Dadashzadeh wrote:
> > > > On Wed, Jul 29, 2009 at 03:36:31PM -0400, Mohammad Dadashzadeh wrote:
> > > > >
> > > > > Description Resource Path Location Type
> > > > > make[2]: *** [C:/ide-4.6-workspace/newPacketcap/x86/o-g/newPacketcap_g
> ]
> >
> > > > Error 1 newPacketcap line 0 C/C++ Problem
> > > >
> > > > Hmm, try this one.
> > > >
> > > > -seanb
> > >
> > >
> > > I tried , no error but I am getting 64-65 packets every 8.3 msec.
> > >
> >
> > You changed the timeout to a negative value?
> >
> > -seanb
>
>
> yes handle = pcap_open_live(dev, 1000, 1, -1, errbuf);
>
Whatever I put as to_ms, there is no change in interval of reading packets.
MohammadMohammad Dadashzadeh(deleted)2009-07-29T20:14:48Zpost34850: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34850
> On Wed, Jul 29, 2009 at 03:46:36PM -0400, Mohammad Dadashzadeh wrote:
> > > On Wed, Jul 29, 2009 at 03:36:31PM -0400, Mohammad Dadashzadeh wrote:
> > > >
> > > > Description Resource Path Location Type
> > > > make[2]: *** [C:/ide-4.6-workspace/newPacketcap/x86/o-g/newPacketcap_g]
>
> > > Error 1 newPacketcap line 0 C/C++ Problem
> > >
> > > Hmm, try this one.
> > >
> > > -seanb
> >
> >
> > I tried , no error but I am getting 64-65 packets every 8.3 msec.
> >
>
> You changed the timeout to a negative value?
>
> -seanb
yes handle = pcap_open_live(dev, 1000, 1, -1, errbuf);
#include <pcap.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <sys/netmgr.h>
#include <sys/neutrino.h>
int main(int argc, char *argv[])
{
pcap_t *handle; /* Session handle */
char *dev; /* The device to sniff on */
pcap_if_t *alldevs;
pcap_if_t *d;
char errbuf[PCAP_ERRBUF_SIZE]; /* Error string */
struct bpf_program fp; /* The compiled filter */
bpf_u_int32 mask; /* Our netmask */
bpf_u_int32 net; /* Our IP */
struct pcap_pkthdr header; /* The header that pcap gives us */
const u_char *packet; /* The actual packet */
time_t local_tv_sec;
struct tm *ltime;
int i=0;
char timestr[16];
int inum;
FILE *stream1;
//const u_char *packet;
/* Retrieve the device list on the local machine */
if (pcap_findalldevs(&alldevs, errbuf) == -1)
{
fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf);
exit(1);
}
stream1=fopen("test2.txt","w");
/* Print the list */
for(d=alldevs; d; d=d->next)
{
printf("%d. %s", ++i, d->name);
if (d->description)
printf(" (%s)\n", d->description);
else
printf(" (No description available)\n");
}
if(i==0)
{
printf("\nNo interfaces found! Make sure WinPcap is installed.\n");
return -1;
}
printf("Enter the interface number (1-%d):",i);
//scanf("%d", &inum);
inum=1;
if(inum < 1 || inum > i)
{
printf("\nInterface number out of range.\n");
/* Free the device list */
pcap_freealldevs(alldevs);
return -1;
}
/* Jump to the selected adapter */
for(d=alldevs, i=0; i< inum-1 ;d=d->next, i++);
/* Define the device */
dev = pcap_lookupdev(errbuf);
strcpy(dev,"wm0");
if (dev == NULL) {
fprintf(stderr, "Couldn't find default device: %s\n", errbuf);
return(2);
}
/* Find the properties for the device */
if (pcap_lookupnet(dev, &net, &mask, errbuf) == -1) {
fprintf(stderr, "Couldn't get netmask for device %s: %s\n", dev, errbuf);
net = 0;
mask = 0;
}
/* Open the session in promiscuous mode */
handle = pcap_open_live(dev, 1000, 1, -1, errbuf);
if (handle == NULL) {
fprintf(stderr, "Couldn't open device %s: %s\n", errbuf);
return(2);
}
/* Grab a packet */
//packet = pcap_next(handle, &header);
for(i=0;i<32000;i++)
{
packet=pcap_next(handle, &header);
local_tv_sec = header.ts.tv_sec;
ltime=localtime(&local_tv_sec);
strftime( timestr, sizeof(timestr), "%H:%M:%S", ltime);
fprintf(stream1,"%s,%.6d len:%d\n", timestr, header.ts.tv_usec, header.len);
}
/* Print its length */
//printf("Jacked a packet with length of [%d]\n", header.len);
/* And close the session */
pcap_close(handle);
fclose(stream1);
printf("\n done");
return(0);
}Mohammad Dadashzadeh(deleted)2009-07-29T19:53:41Zpost34849: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34849
On Wed, Jul 29, 2009 at 03:46:36PM -0400, Mohammad Dadashzadeh wrote:
> > On Wed, Jul 29, 2009 at 03:36:31PM -0400, Mohammad Dadashzadeh wrote:
> > >
> > > Description Resource Path Location Type
> > > make[2]: *** [C:/ide-4.6-workspace/newPacketcap/x86/o-g/newPacketcap_g]
> > Error 1 newPacketcap line 0 C/C++ Problem
> >
> > Hmm, try this one.
> >
> > -seanb
>
>
> I tried , no error but I am getting 64-65 packets every 8.3 msec.
>
You changed the timeout to a negative value?
-seanbSean Boudreau(deleted)2009-07-29T19:49:24Zpost34848: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34848
> On Wed, Jul 29, 2009 at 03:36:31PM -0400, Mohammad Dadashzadeh wrote:
> >
> > Description Resource Path Location Type
> > make[2]: *** [C:/ide-4.6-workspace/newPacketcap/x86/o-g/newPacketcap_g]
> Error 1 newPacketcap line 0 C/C++ Problem
>
> Hmm, try this one.
>
> -seanb
I tried , no error but I am getting 64-65 packets every 8.3 msec.
MohammadMohammad Dadashzadeh(deleted)2009-07-29T19:46:36Zpost34845: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34845
On Wed, Jul 29, 2009 at 03:36:31PM -0400, Mohammad Dadashzadeh wrote:
>
> Description Resource Path Location Type
> make[2]: *** [C:/ide-4.6-workspace/newPacketcap/x86/o-g/newPacketcap_g] Error 1 newPacketcap line 0 C/C++ Problem
Hmm, try this one.
-seanbSean Boudreau(deleted)2009-07-29T19:40:37Zpost34844: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34844
> On Wed, Jul 29, 2009 at 03:20:29PM -0400, Mohammad Dadashzadeh wrote:
> > > On Wed, Jul 29, 2009 at 03:06:56PM -0400, Mohammad Dadashzadeh wrote:
> > > > > On Wed, Jul 29, 2009 at 01:12:48PM -0400, Mohammad Dadashzadeh wrote:
> > > > > > in which file I can change BIOCIMMEDIATE ?
> > > > >
> > > > > Please try this libpcap. By default it should
> > > > > work the same way, if you pass a negative timeout
> > > > > to pcap_open_live() you should get immediate mode.
> > > > > If you can verify both I'll check it in.
> > > > >
> > > > > Regards,
> > > > >
> > > > > -seanb
> > > >
> > > >
> > > > Should copy libpcap.a into the target machine or Momentics IDE or both?
> > >
> > > BTW that was an x86 static variant.
> > >
> > > -seanb
> >
> >
> > Unfortunately I do not understand "BTW that was an x86 static variant"
> >
> > Could you please explain more?
> >
> > I copied into C:\QNX641\target\qnx6\x86\usr\lib but code can not ve compiled
> . It shows many error.
>
> What are the errors?
>
> -seanb
Description Resource Path Location Type
make[2]: *** [C:/ide-4.6-workspace/newPacketcap/x86/o-g/newPacketcap_g] Error 1 newPacketcap line 0 C/C++ Problem
make[2]: *** [C:/ide-4.6-workspace/newPacketcap/x86/o/newPacketcap] Error 1 newPacketcap line 0 C/C++ Problem
newPacketcap.c: undefined reference to `pcap_close' newPacketcap line 0 C/C++ Problem
newPacketcap.c: undefined reference to `pcap_findalldevs' newPacketcap line 0 C/C++ Problem
newPacketcap.c: undefined reference to `pcap_freealldevs' newPacketcap line 0 C/C++ Problem
newPacketcap.c: undefined reference to `pcap_lookupdev' newPacketcap line 0 C/C++ Problem
newPacketcap.c: undefined reference to `pcap_lookupnet' newPacketcap line 0 C/C++ Problem
newPacketcap.c: undefined reference to `pcap_next' newPacketcap line 0 C/C++ Problem
newPacketcap.c: undefined reference to `pcap_open_live' newPacketcap line 0 C/C++ Problem
undefined reference to `pcap_close' newPacketcap.c newPacketcap line 109 C/C++ Problem
undefined reference to `pcap_findalldevs' newPacketcap.c newPacketcap line 32 C/C++ Problem
undefined reference to `pcap_freealldevs' newPacketcap.c newPacketcap line 65 C/C++ Problem
undefined reference to `pcap_lookupdev' newPacketcap.c newPacketcap line 75 C/C++ Problem
undefined reference to `pcap_lookupnet' newPacketcap.c newPacketcap line 82 C/C++ Problem
undefined reference to `pcap_next' newPacketcap.c newPacketcap line 100 C/C++ Problem
undefined reference to `pcap_open_live' newPacketcap.c newPacketcap line 88 C/C++ ProblemMohammad Dadashzadeh(deleted)2009-07-29T19:36:31Zpost34842: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34842
On Wed, Jul 29, 2009 at 03:20:29PM -0400, Mohammad Dadashzadeh wrote:
> > On Wed, Jul 29, 2009 at 03:06:56PM -0400, Mohammad Dadashzadeh wrote:
> > > > On Wed, Jul 29, 2009 at 01:12:48PM -0400, Mohammad Dadashzadeh wrote:
> > > > > in which file I can change BIOCIMMEDIATE ?
> > > >
> > > > Please try this libpcap. By default it should
> > > > work the same way, if you pass a negative timeout
> > > > to pcap_open_live() you should get immediate mode.
> > > > If you can verify both I'll check it in.
> > > >
> > > > Regards,
> > > >
> > > > -seanb
> > >
> > >
> > > Should copy libpcap.a into the target machine or Momentics IDE or both?
> >
> > BTW that was an x86 static variant.
> >
> > -seanb
>
>
> Unfortunately I do not understand "BTW that was an x86 static variant"
>
> Could you please explain more?
>
> I copied into C:\QNX641\target\qnx6\x86\usr\lib but code can not ve compiled. It shows many error.
What are the errors?
-seanbSean Boudreau(deleted)2009-07-29T19:22:57Zpost34841: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34841
> On Wed, Jul 29, 2009 at 03:06:56PM -0400, Mohammad Dadashzadeh wrote:
> > > On Wed, Jul 29, 2009 at 01:12:48PM -0400, Mohammad Dadashzadeh wrote:
> > > > in which file I can change BIOCIMMEDIATE ?
> > >
> > > Please try this libpcap. By default it should
> > > work the same way, if you pass a negative timeout
> > > to pcap_open_live() you should get immediate mode.
> > > If you can verify both I'll check it in.
> > >
> > > Regards,
> > >
> > > -seanb
> >
> >
> > Should copy libpcap.a into the target machine or Momentics IDE or both?
>
> BTW that was an x86 static variant.
>
> -seanb
Unfortunately I do not understand "BTW that was an x86 static variant"
Could you please explain more?
I copied into C:\QNX641\target\qnx6\x86\usr\lib but code can not ve compiled. It shows many error.
Regards,
MohammadMohammad Dadashzadeh(deleted)2009-07-29T19:20:27Zpost34840: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34840
On Wed, Jul 29, 2009 at 03:06:56PM -0400, Mohammad Dadashzadeh wrote:
> > On Wed, Jul 29, 2009 at 01:12:48PM -0400, Mohammad Dadashzadeh wrote:
> > > in which file I can change BIOCIMMEDIATE ?
> >
> > Please try this libpcap. By default it should
> > work the same way, if you pass a negative timeout
> > to pcap_open_live() you should get immediate mode.
> > If you can verify both I'll check it in.
> >
> > Regards,
> >
> > -seanb
>
>
> Should copy libpcap.a into the target machine or Momentics IDE or both?
BTW that was an x86 static variant.
-seanbSean Boudreau(deleted)2009-07-29T19:14:53Zpost34839: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34839
On Wed, Jul 29, 2009 at 03:06:56PM -0400, Mohammad Dadashzadeh wrote:
> > On Wed, Jul 29, 2009 at 01:12:48PM -0400, Mohammad Dadashzadeh wrote:
> > > in which file I can change BIOCIMMEDIATE ?
> >
> > Please try this libpcap. By default it should
> > work the same way, if you pass a negative timeout
> > to pcap_open_live() you should get immediate mode.
> > If you can verify both I'll check it in.
> >
> > Regards,
> >
> > -seanb
>
>
> Should copy libpcap.a into the target machine or Momentics IDE or both?
Just link against it via your favourite method. It's not
needed at runtime as it's a static variant. I'm trying to
'bring the mountain to Mohammad' but as I'm not at your
build environment I can't be more specific than that :)
-seanbSean Boudreau(deleted)2009-07-29T19:13:15Zpost34838: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34838
> On Wed, Jul 29, 2009 at 01:12:48PM -0400, Mohammad Dadashzadeh wrote:
> > in which file I can change BIOCIMMEDIATE ?
>
> Please try this libpcap. By default it should
> work the same way, if you pass a negative timeout
> to pcap_open_live() you should get immediate mode.
> If you can verify both I'll check it in.
>
> Regards,
>
> -seanb
Should copy libpcap.a into the target machine or Momentics IDE or both?Mohammad Dadashzadeh(deleted)2009-07-29T19:06:55Zpost34836: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34836
On Wed, Jul 29, 2009 at 01:12:48PM -0400, Mohammad Dadashzadeh wrote:
> in which file I can change BIOCIMMEDIATE ?
Please try this libpcap. By default it should
work the same way, if you pass a negative timeout
to pcap_open_live() you should get immediate mode.
If you can verify both I'll check it in.
Regards,
-seanbSean Boudreau(deleted)2009-07-29T18:48:26Zpost34829: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34829
> I guess I probably didn't reply on the proper leaf
> on the thread. I'm talking about the delay in
> replying to the read(). I can't see that the timestamp
> here is used for anything but you're right in that
> it's not all that granular.
>
> Regards,
>
> -seanb
I think I may have missed the whole point of this thread! I thought the concern was for the lack of granularity, as evidenced by the printed timestamps.
MurfJohn Murphy2009-07-29T18:12:23Zpost34823: Re: RE: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34823
Where is mtime? how can I change it?Mohammad Dadashzadeh(deleted)2009-07-29T17:13:39Zpost34822: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34822
in which file I can change BIOCIMMEDIATE ?
Regards,
MohammadMohammad Dadashzadeh(deleted)2009-07-29T17:12:47Zpost34821: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34821
On Wed, Jul 29, 2009 at 01:03:04PM -0400, John Murphy wrote:
> Sean, are we talking about the resolution of the timestamps, or how often pcap satisfies a read request?
I guess I probably didn't reply on the proper leaf
on the thread. I'm talking about the delay in
replying to the read(). I can't see that the timestamp
here is used for anything but you're right in that
it's not all that granular.
Regards,
-seanbSean Boudreau(deleted)2009-07-29T17:11:47Zpost34819: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34819
Sean, are we talking about the resolution of the timestamps, or how often pcap satisfies a read request?
MurfJohn Murphy2009-07-29T17:03:03Zpost34817: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34817
On Wed, Jul 29, 2009 at 11:58:55AM -0400, John Murphy wrote:
> Take a look at sys/net/bpf.c in the networking trunk. I believe it sets the timestamp via a call to microtime, which is in sys/currenttime.c, which calsl mtime in the same file), which get the current time, then maks off a bunch of the least significant digits.
>
> I may be way off base here, and this might just lead you into another round of "what's going on here?", but I'd sure take a look at the other possibilities before I tried to rebuild all of io-pkt with a rather fundamental change --- but that's just me.
It seems to boil down to pcap_open_live() taking a timeout
the smallest value of which boils down to HZ in the stack
(stack rounds up to that value). A value of zero means wait
until the buffer's full. There's a BIOCIMMEDIATE bpf ioctl
that would probably help here but libpcap currently only
uses it for AIX.
Soo... The easier 'fix' would be to set BIOCIMMEDIATE in
pcap_open_live() if the timeout is less than a tick which
you can get from sysctl() / sysctlbyname().
-seanbSean Boudreau(deleted)2009-07-29T16:46:59Zpost34816: Re: RE: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34816
in mtime it is using tick not microsecond so I think you can modify it to use microsecond then you should be able to get microsecond precision.
if mtime is not local then you should be able to preload to override it but it is static.Yao Zhao(deleted)2009-07-29T16:36:16Zpost34815: Re: RE: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34815
Exactly! But that's a bit different than monkeying with constants that affect all of the networking code.
MurfJohn Murphy2009-07-29T16:01:35Zpost34813: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34813
Take a look at sys/net/bpf.c in the networking trunk. I believe it sets the timestamp via a call to microtime, which is in sys/currenttime.c, which calsl mtime in the same file), which get the current time, then maks off a bunch of the least significant digits.
I may be way off base here, and this might just lead you into another round of "what's going on here?", but I'd sure take a look at the other possibilities before I tried to rebuild all of io-pkt with a rather fundamental change --- but that's just me.
MurfJohn Murphy2009-07-29T15:58:54Zpost34812: RE: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34812
> -----Original Message-----
> From: John Murphy [mailto:community-noreply@qnx.com]
> Sent: Wednesday, July 29, 2009 11:48 AM
> To: ionetmig-networking
> Subject: Re: strange behavior of using pcap.h
>
> On an X86 (at least), the clock interrupts happen at a rate close to
> one per millisecond, so you can never achieve a pcap timestamp
> resolution better than about one millisecond.
>
Sure you can with ClockCycles()
> If what you're after is better resolution, it might be easier to just
> build your own bpf.c.
>
>
> Murf
>
>
>
> _______________________________________________
>
> io-net migration
> http://community.qnx.com/sf/go/post34809
>Mario Charest2009-07-29T15:55:49Zpost34810: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34810
> On an X86 (at least), the clock interrupts happen at a rate close to one per
> millisecond, so you can never achieve a pcap timestamp resolution better than
> about one millisecond.
>
> If what you're after is better resolution, it might be easier to just build
> your own bpf.c.
>
>
> Murf
From where should I start to learn how to write my own bpf.c file. I was getting very good resolution in win XP using winpcap.
Regards,
MohammadMohammad Dadashzadeh(deleted)2009-07-29T15:51:27Zpost34809: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34809
On an X86 (at least), the clock interrupts happen at a rate close to one per millisecond, so you can never achieve a pcap timestamp resolution better than about one millisecond.
If what you're after is better resolution, it might be easier to just build your own bpf.c.
MurfJohn Murphy2009-07-29T15:48:06Zpost34808: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34808
recompile io-pktMohammad Dadashzadeh(deleted)2009-07-29T15:47:47Zpost34807: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34807
what do you want to do? recompile io-pkt or the whole OS?Yao Zhao(deleted)2009-07-29T15:37:01Zpost34806: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34806
I downloaded kernel source from
svn checkout --username <username> http://community.qnx.com/svn/repos/coreos_pub/trunk
and followed all the instructions and was able to compile and build the OS.
Now should I download all the below links or one of the is enough?
svn checkout --username <userid> http://community.qnx.com/svn/repos/core_networking/trunk
Where <userid> is the email address used to create your account on the QNX site.
To check out the 6.4.0 GA release branch source, use
svn checkout --username <userid> http://community.qnx.com/svn/repos/core_networking/tags/6.4.0/GA
To check out the 6.4.0 maintenance branch source (which includes critical fixes to the GA release), use
svn checkout --username <userid> http://community.qnx.com/svn/repos/core_networking/branches/6.4.0/trunk
MohammadMohammad Dadashzadeh(deleted)2009-07-29T15:29:19Zpost34804: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34804
that is correct but probably it won't work as many places are assuming 1 HZ is 8ms but now it is not. but you could try.Yao Zhao(deleted)2009-07-29T15:12:10Zpost34803: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34803
in order to change the 8.39 msec to 32 usec
this is the default
* 2^23ns = 2^23ns * (1000ms / 10^9ns) = 8.39ms = 119.209Hz
*/
#define NTO_TSHIFT 23
#define NTO_HZ 119
#define NTO_mHZ 119209
I am going to change it to
* 2^15ns = 2^15ns * (1000ms / 10^9ns) = 32.77us = 30517.578Hz
*/
#define NTO_TSHIFT 15
#define NTO_HZ 30517
#define NTO_mHZ 30517578
and then compile,
is this correct?
MohammadMohammad Dadashzadeh(deleted)2009-07-29T15:07:07Zpost34798: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34798
On Wed, Jul 29, 2009 at 10:30:40AM -0400, Mohammad Dadashzadeh wrote:
> > On Tue, Jul 28, 2009 at 05:13:12PM -0400, Mohammad Dadashzadeh wrote:
> > > I am trying to recompile the source based on below document
> > >
> > > http://community.qnx.com/sf/sfmain/do/downloadAttachment/projects.core_os/
> > wiki/BuildKernelWithIDE?id=atch1253
> > >
> > >
> > > at the end when I run it says:
> > >
> > > /cygdrive/c/QNX641/workspace not a directory
> >
> > I'm not sure that applies to the networking source...
> > I've never tried building under the IDE but a
> > straight 'make' as described here should work.
> >
> > http://community.qnx.com/sf/wiki/do/viewPage/projects.networking/wiki/
> > Source_Guide
> >
> > Regards,
> >
> > -seanb
>
>
> Should I do this in QNX machine or in development machine I am really confused.
> Should I rebuild the entire OS or just Networking core.
> svn command works in QNX machine not in development machine.
The development machine (note a QNX machine can also
be a development machine). For this particular issue
only the io-pkt binary need to be touched but it's
often easier to build the entire networking tree as
described in the above link.
Regards,
-seanbSean Boudreau(deleted)2009-07-29T14:35:11Zpost34796: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34796
> On Tue, Jul 28, 2009 at 05:13:12PM -0400, Mohammad Dadashzadeh wrote:
> > I am trying to recompile the source based on below document
> >
> > http://community.qnx.com/sf/sfmain/do/downloadAttachment/projects.core_os/
> wiki/BuildKernelWithIDE?id=atch1253
> >
> >
> > at the end when I run it says:
> >
> > /cygdrive/c/QNX641/workspace not a directory
>
> I'm not sure that applies to the networking source...
> I've never tried building under the IDE but a
> straight 'make' as described here should work.
>
> http://community.qnx.com/sf/wiki/do/viewPage/projects.networking/wiki/
> Source_Guide
>
> Regards,
>
> -seanb
Should I do this in QNX machine or in development machine I am really confused.
Should I rebuild the entire OS or just Networking core.
svn command works in QNX machine not in development machine.
Regards,
MohammadMohammad Dadashzadeh(deleted)2009-07-29T14:30:40Zpost34790: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34790
On Tue, Jul 28, 2009 at 05:13:12PM -0400, Mohammad Dadashzadeh wrote:
> I am trying to recompile the source based on below document
>
> http://community.qnx.com/sf/sfmain/do/downloadAttachment/projects.core_os/wiki/BuildKernelWithIDE?id=atch1253
>
>
> at the end when I run it says:
>
> /cygdrive/c/QNX641/workspace not a directory
I'm not sure that applies to the networking source...
I've never tried building under the IDE but a
straight 'make' as described here should work.
http://community.qnx.com/sf/wiki/do/viewPage/projects.networking/wiki/Source_Guide
Regards,
-seanbSean Boudreau(deleted)2009-07-29T13:59:03Zpost34759: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34759
I am trying to recompile the source based on below document
http://community.qnx.com/sf/sfmain/do/downloadAttachment/projects.core_os/wiki/BuildKernelWithIDE?id=atch1253
at the end when I run it says:
/cygdrive/c/QNX641/workspace not a directoryMohammad Dadashzadeh(deleted)2009-07-28T21:13:09Zpost34752: Re: RE: LSM name shown by pidin
http://community.qnx.com/sf/go/post34752
Interesting! The ONLY place we've seen the WRONG name is on 6.4.1. I guess that resolving symbols could easily involve writing to the object, but I don't think I've have ever thought of that one. I'll give up on that one for awhile and concentrate on other issues.
Thanks for the response!
MurfJohn Murphy2009-07-28T18:08:13Zpost34751: Re: RE: LSM name shown by pidin
http://community.qnx.com/sf/go/post34751
As far as I know, the only way to track a PR's progress is to ask about it periodically.
I asked about this one (so I can add it to the release notes), and Brian Stecher says that pidin can get confused if the first page of a memory-mapped object gets written to. You're more likely to see the right name as you move from 6.3.2 to 6.4.0 to 6.4.1, but the underlying problem still exists. There's no workaround.Steve Reid2009-07-28T17:05:12Zpost34750: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34750
> when I use my user name in this command it does not work?
>
> svn checkout --username <username> http://community.qnx.com/svn/repos/coreos_pub/trunk
>
>
> Mohammad
it shows :
PRPOFIND request failed on .......
........... 405 method Not allowedMohammad Dadashzadeh(deleted)2009-07-28T17:03:51Zpost34748: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34748
when I use my user name in this command it does not work?
svn checkout --username <username> http://community.qnx.com/svn/repos/coreos_pub/trunk
MohammadMohammad Dadashzadeh(deleted)2009-07-28T17:01:01Zpost34746: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34746
> Could I do this in evaluation version where I have QNX Momentics IDE Version 4
> .6.0?
>
> Mohammad
>
>
>
Should I have website downloader to download all the files.
http://community.qnx.com/svn/repos/coreos_pub/trunk/
MohammadMohammad Dadashzadeh(deleted)2009-07-28T16:48:40Zpost34743: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34743
Could I do this in evaluation version where I have QNX Momentics IDE Version 4.6.0?
MohammadMohammad Dadashzadeh(deleted)2009-07-28T16:25:25Zpost34735: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34735
On Tue, Jul 28, 2009 at 11:18:22AM -0400, Mohammad Dadashzadeh wrote:
> Sorry I did not get it,
>
> Recompile of what, Could you please let me know How I can do it?
You'd need to check out the source from the networking
repo and follow the instructions here:
http://community.qnx.com/sf/wiki/do/viewPage/projects.networking/wiki/Source_Guide
The defines that control this are in io-pkt/sys/sys/time_bsd.h
(look for __QNXNTO__)
Regards,
-seanbSean Boudreau(deleted)2009-07-28T15:23:21Zpost34734: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34734
Sorry I did not get it,
Recompile of what, Could you please let me know How I can do it?
Regards,
MohammadMohammad Dadashzadeh(deleted)2009-07-28T15:18:21Zpost34732: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34732
On Tue, Jul 28, 2009 at 11:14:11AM -0400, Mohammad Dadashzadeh wrote:
> can I change it?
It would involve a re-compile.
Regards,
-seanbSean Boudreau(deleted)2009-07-28T15:15:38Zpost34731: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34731
can I change it?Mohammad Dadashzadeh(deleted)2009-07-28T15:14:10Zpost34730: Re: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34730
On Tue, Jul 28, 2009 at 10:51:19AM -0400, Mohammad Dadashzadeh wrote:
> Dear All,
> let's see some part of the captured data. Instead of getting two packets every 250usec I am getting 64 to 65 packets every 8389 usec. Is there anything wrong with the settings or netwrok driver in QNX. I tested the same network card in windows XP embedded with winpcap and it was working very well. I would be very thankful if you help me.
That's the clockrate in io-pkt:
# sysctl kern.clockrate
kern.clockrate: tick = 8403, hz = 119
-seanbSean Boudreau(deleted)2009-07-28T15:03:34Zpost34723: RE: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34723
> I am getting 64 to 65 packets every 8389 usec.
I think the system time which localtime() is
fetching is only being updated every 10ms timer
tick.
I think you want a better timestamp - try
clockcycles() or something like that.
--
aboydAndrew Boyd(deleted)2009-07-28T14:54:55Zpost34722: strange behavior of using pcap.h
http://community.qnx.com/sf/go/post34722
Dear All,
Fortunately I was able to use pcap.h to capture packet in QNX. I am using below command to open a session
/* Open the session in promiscuous mode */
handle = pcap_open_live(dev, 65536, 1, 1000, errbuf);
I am also using below commands to capture and store packets
for(i=0;i<32000;i++)
{
packet=pcap_next(handle, &header);
local_tv_sec = header.ts.tv_sec;
ltime=localtime(&local_tv_sec);
strftime( timestr, sizeof(timestr), "%H:%M:%S", ltime);
fprintf(stream1,"%s,%.6d len:%d\n", timestr, header.ts.tv_usec, header.len);
}
I have a testing device which sends two packets per 250usec. Therefore, I am expecting to capture packets in the same trend.
By the way, two network cards are connected to my QNX target machine and I am using one of them only for data capturing from tester.
let's see some part of the captured data. Instead of getting two packets every 250usec I am getting 64 to 65 packets every 8389 usec. Is there anything wrong with the settings or netwrok driver in QNX. I tested the same network card in windows XP embedded with winpcap and it was working very well. I would be very thankful if you help me.
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,599566 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,607955 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,616344 len:121
10:23:11,624732 len:121Mohammad Dadashzadeh(deleted)2009-07-28T14:51:18Zpost34644: Re: RE: LSM name shown by pidin
http://community.qnx.com/sf/go/post34644
Aha, that makes sense! But does that mean there's no way to track progress on a showstopper bug until a new release comes out?
MurfJohn Murphy2009-07-27T15:44:15Zpost34643: RE: LSM name shown by pidin
http://community.qnx.com/sf/go/post34643
I'm pretty sure PRs aren't visible outside the company :(
They contain customer references, etc.
--
aboydAndrew Boyd(deleted)2009-07-27T15:40:47Zpost34641: Re: LSM name shown by pidin
http://community.qnx.com/sf/go/post34641
I've spent another bunch of hours trying to track down this bug and/or find a workaround, with no success. I'm unable to find any reference to PR43050; what's the procedure for tracking the progress on, or even the definition of, a PR?
MurfJohn Murphy2009-07-27T15:28:34Zpost34550: Re: using pcap.h
http://community.qnx.com/sf/go/post34550
On Fri, Jul 24, 2009 at 02:25:00PM -0400, Mohammad Dadashzadeh wrote:
> I attached the project file maybe you find the problem. I also posted the problem under build section.
This isn't really a networking issue, rather a debugging one.
IIRC you're using the ide? Maybe try in the ide group:
http://community.qnx.com/sf/projects/ide
Regards,
-seanbSean Boudreau(deleted)2009-07-24T18:29:30Zpost34549: Re: using pcap.h
http://community.qnx.com/sf/go/post34549
I attached the project file maybe you find the problem. I also posted the problem under build section.
Regards,
MohammadMohammad Dadashzadeh(deleted)2009-07-24T18:24:56Zpost34532: Re: using pcap.h
http://community.qnx.com/sf/go/post34532
Congratulations, you've now moved onto a tools issue :)
I'd check that you've compiled a debug variant and
maybe ask for help in the tools project.
Regards,
-seanb
On Fri, Jul 24, 2009 at 12:02:18PM -0400, Mohammad Dadashzadeh wrote:
> Thak you for your help. this helped to solve the problem. Now I am using pcap_loop to capture packets. The project compiles and builds but during debugging when I run pcap_loop function the program stops and shows
>
> No source available for "pcap_loop() "
>
>
> my code
>
>
> #include <stdlib.h>
> #include <stdio.h>
> #include "pcap.h"
>
> /* prototype of the packet handler */
> void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data);
>
> int main(int argc, char *argv[]) {
> pcap_if_t *alldevs;
> pcap_if_t *d;
> int inum;
> int i=0;
> pcap_t *adhandle;
> char errbuf[PCAP_ERRBUF_SIZE];
>
> /* Retrieve the device list on the local machine */
> if (pcap_findalldevs(&alldevs, errbuf) == -1)
> {
> fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf);
> exit(1);
> }
>
> /* Print the list */
> for(d=alldevs; d; d=d->next)
> {
> printf("%d. %s", ++i, d->name);
> if (d->description)
> printf(" (%s)\n", d->description);
> else
> printf(" (No description available)\n");
> }
>
> if(i==0)
> {
> printf("\nNo interfaces found! Make sure WinPcap is installed.\n");
> return -1;
> }
>
> printf("Enter the interface number (1-%d):",i);
> //scanf("%d", &inum);
> inum=1;
>
> if(inum < 1 || inum > i)
> {
> printf("\nInterface number out of range.\n");
> /* Free the device list */
> pcap_freealldevs(alldevs);
> return -1;
> }
>
> /* Jump to the selected adapter */
> for(d=alldevs, i=0; i< inum-1 ;d=d->next, i++);
>
> /* Open the device */
>
> adhandle=pcap_open_live(d->name, 65536, 1, 20, errbuf);
>
> if (adhandle=NULL)
> {
> fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n", d->name);
> /* Free the device list */
> pcap_freealldevs(alldevs);
> return -1;
> }
>
> //printf("\nlistening on %s...\n", d->description);
>
> /* At this point, we don't need any more the device list. Free it */
> pcap_freealldevs(alldevs);
>
> /* start the capture */
> pcap_loop(adhandle, 0, packet_handler, NULL);
>
> return EXIT_SUCCESS;
> }
>
> /* Callback function invoked by libpcap for every incoming packet */
> void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data)
> {
> struct tm *ltime;
> char timestr[16];
> time_t local_tv_sec;
>
> /* convert the timestamp to readable format */
> local_tv_sec = header->ts.tv_sec;
> ltime=localtime(&local_tv_sec);
> strftime( timestr, sizeof timestr, "%H:%M:%S", ltime);
>
> printf("%s,%.6d len:%d\n", timestr, header->ts.tv_usec, header->len);
>
> }
>
>
>
>
> _______________________________________________
>
> io-net migration
> http://community.qnx.com/sf/go/post34529
>Sean Boudreau(deleted)2009-07-24T16:20:11Zpost34531: Re: using pcap.h
http://community.qnx.com/sf/go/post34531
> >
> > You mean I have to add libpcap in Project\linker\Extra library\pcap
>
> I guess so. However the ide lets you do it :)
>
> >
> > I did that it gives me more error.
> >
> >
> > Description Resource Path Location Type
> > undefined reference to `ether_hostton' packetcapture2 line 0 C/C++ Problem
>
> > undefined reference to `freeaddrinfo' packetcapture2 line 0 C/C++ Problem
> > undefined reference to `freeifaddrs' packetcapture2 line 0 C/C++ Problem
> > undefined reference to `getaddrinfo' packetcapture2 line 0 C/C++ Problem
> > undefined reference to `gethostbyname' packetcapture2 line 0 C/C++ Problem
>
> > undefined reference to `getifaddrs' packetcapture2 line 0 C/C++ Problem
> > undefined reference to `getnetbyname' packetcapture2 line 0 C/C++ Problem
> > undefined reference to `getprotobyname' packetcapture2 line 0 C/C++
> Problem
> > undefined reference to `getservbyname' packetcapture2 line 0 C/C++ Problem
>
> > undefined reference to `ioctl_socket' packetcapture2 line 0 C/C++ Problem
> > undefined reference to `socket' packetcapture2 line 0 C/C++ Problem
> > C:/QNX641/target/qnx6/x86/usr/lib\libpcap.a(pcap-bpf.o): more undefined
> references to `ioctl_socket' follow packetcapture2 line 0 C/C++ Problem
> > make[2]: *** [C:/ide-4.6-workspace/packetcapture2/x86/o-g/packetcapture2_g]
> Error 1 packetcapture2 line 0 C/C++ Problem
> > make[2]: *** [C:/ide-4.6-workspace/packetcapture2/x86/o/packetcapture2]
> Error 1 packetcapture2 line 0 C/C++ Problem
> >
>
> These are in libsocket.
>
> -seanb
Re: using pcap.h
Thak you for your help. this helped to solve the problem. Now I am using pcap_loop to capture packets. The project
compiles and builds but during debugging when I run pcap_loop function the program stops and shows
No source available for "pcap_loop() "
my code
#include <stdlib.h>
#include <stdio.h>
#include "pcap.h"
/* prototype of the packet handler */
void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data);
int main(int argc, char *argv[]) {
pcap_if_t *alldevs;
pcap_if_t *d;
int inum;
int i=0;
pcap_t *adhandle;
char errbuf[PCAP_ERRBUF_SIZE];
/* Retrieve the device list on the local machine */
if (pcap_findalldevs(&alldevs, errbuf) == -1)
{
fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf);
exit(1);
}
/* Print the list */
for(d=alldevs; d; d=d->next)
{
printf("%d. %s", ++i, d->name);
if (d->description)
printf(" (%s)\n", d->description);
else
printf(" (No description available)\n");
}
if(i==0)
{
printf("\nNo interfaces found! Make sure WinPcap is installed.\n");
return -1;
}
printf("Enter the interface number (1-%d):",i);
//scanf("%d", &inum);
inum=1;
if(inum < 1 || inum > i)
{
printf("\nInterface number out of range.\n");
/* Free the device list */
pcap_freealldevs(alldevs);
return -1;
}
/* Jump to the selected adapter */
for(d=alldevs, i=0; i< inum-1 ;d=d->next, i++);
/* Open the device */
adhandle=pcap_open_live(d->name, 65536, 1, 20, errbuf);
if (adhandle=NULL)
{
fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n", d->name);
/* Free the device list */
pcap_freealldevs(alldevs);
return -1;
}
//printf("\nlistening on %s...\n", d->description);
/* At this point, we don't need any more the device list. Free it */
pcap_freealldevs(alldevs);
/* start the capture */
pcap_loop(adhandle, 0, packet_handler, NULL);
return EXIT_SUCCESS;
}
/* Callback function invoked by libpcap for every incoming packet */
void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data)
{
struct tm *ltime;
char timestr[16];
time_t local_tv_sec;
/* convert the timestamp to readable format */
local_tv_sec = header->ts.tv_sec;
ltime=localtime(&local_tv_sec);
strftime( timestr, sizeof timestr, "%H:%M:%S", ltime);
printf("%s,%.6d len:%d\n", timestr, header->ts.tv_usec, header->len);
}Mohammad Dadashzadeh(deleted)2009-07-24T16:19:04Zpost34529: Re: using pcap.h
http://community.qnx.com/sf/go/post34529
Thak you for your help. this helped to solve the problem. Now I am using pcap_loop to capture packets. The project compiles and builds but during debugging when I run pcap_loop function the program stops and shows
No source available for "pcap_loop() "
my code
#include <stdlib.h>
#include <stdio.h>
#include "pcap.h"
/* prototype of the packet handler */
void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data);
int main(int argc, char *argv[]) {
pcap_if_t *alldevs;
pcap_if_t *d;
int inum;
int i=0;
pcap_t *adhandle;
char errbuf[PCAP_ERRBUF_SIZE];
/* Retrieve the device list on the local machine */
if (pcap_findalldevs(&alldevs, errbuf) == -1)
{
fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf);
exit(1);
}
/* Print the list */
for(d=alldevs; d; d=d->next)
{
printf("%d. %s", ++i, d->name);
if (d->description)
printf(" (%s)\n", d->description);
else
printf(" (No description available)\n");
}
if(i==0)
{
printf("\nNo interfaces found! Make sure WinPcap is installed.\n");
return -1;
}
printf("Enter the interface number (1-%d):",i);
//scanf("%d", &inum);
inum=1;
if(inum < 1 || inum > i)
{
printf("\nInterface number out of range.\n");
/* Free the device list */
pcap_freealldevs(alldevs);
return -1;
}
/* Jump to the selected adapter */
for(d=alldevs, i=0; i< inum-1 ;d=d->next, i++);
/* Open the device */
adhandle=pcap_open_live(d->name, 65536, 1, 20, errbuf);
if (adhandle=NULL)
{
fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n", d->name);
/* Free the device list */
pcap_freealldevs(alldevs);
return -1;
}
//printf("\nlistening on %s...\n", d->description);
/* At this point, we don't need any more the device list. Free it */
pcap_freealldevs(alldevs);
/* start the capture */
pcap_loop(adhandle, 0, packet_handler, NULL);
return EXIT_SUCCESS;
}
/* Callback function invoked by libpcap for every incoming packet */
void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data)
{
struct tm *ltime;
char timestr[16];
time_t local_tv_sec;
/* convert the timestamp to readable format */
local_tv_sec = header->ts.tv_sec;
ltime=localtime(&local_tv_sec);
strftime( timestr, sizeof timestr, "%H:%M:%S", ltime);
printf("%s,%.6d len:%d\n", timestr, header->ts.tv_usec, header->len);
}Mohammad Dadashzadeh(deleted)2009-07-24T16:02:18Zpost34525: Re: using pcap.h
http://community.qnx.com/sf/go/post34525
>
> You mean I have to add libpcap in Project\linker\Extra library\pcap
I guess so. However the ide lets you do it :)
>
> I did that it gives me more error.
>
>
> Description Resource Path Location Type
> undefined reference to `ether_hostton' packetcapture2 line 0 C/C++ Problem
> undefined reference to `freeaddrinfo' packetcapture2 line 0 C/C++ Problem
> undefined reference to `freeifaddrs' packetcapture2 line 0 C/C++ Problem
> undefined reference to `getaddrinfo' packetcapture2 line 0 C/C++ Problem
> undefined reference to `gethostbyname' packetcapture2 line 0 C/C++ Problem
> undefined reference to `getifaddrs' packetcapture2 line 0 C/C++ Problem
> undefined reference to `getnetbyname' packetcapture2 line 0 C/C++ Problem
> undefined reference to `getprotobyname' packetcapture2 line 0 C/C++ Problem
> undefined reference to `getservbyname' packetcapture2 line 0 C/C++ Problem
> undefined reference to `ioctl_socket' packetcapture2 line 0 C/C++ Problem
> undefined reference to `socket' packetcapture2 line 0 C/C++ Problem
> C:/QNX641/target/qnx6/x86/usr/lib\libpcap.a(pcap-bpf.o): more undefined references to `ioctl_socket' follow packetcapture2 line 0 C/C++ Problem
> make[2]: *** [C:/ide-4.6-workspace/packetcapture2/x86/o-g/packetcapture2_g] Error 1 packetcapture2 line 0 C/C++ Problem
> make[2]: *** [C:/ide-4.6-workspace/packetcapture2/x86/o/packetcapture2] Error 1 packetcapture2 line 0 C/C++ Problem
>
These are in libsocket.
-seanbSean Boudreau(deleted)2009-07-24T15:27:55Zpost34524: Re: RE: using pcap.h
http://community.qnx.com/sf/go/post34524
thanks for yor reply
the link does not work
MohammadMohammad Dadashzadeh(deleted)2009-07-24T15:26:03Zpost34523: Re: using pcap.h
http://community.qnx.com/sf/go/post34523
> On Fri, Jul 24, 2009 at 11:09:39AM -0400, Mohammad Dadashzadeh wrote:
> > Dear all,
> >
> > I am a beginner in using QNX. I would like to use pcap.h to capture MAC
> packets. I am using bellow code to read all the network devices. Code complies
> without any error. However, when I want to build the project it gives me
> below error. I would be very thankful if someone helps me.
> >
> > Description Resource Path Location Type
> > make[2]: *** [C:/ide-4.6-workspace/packetcapture2/x86/o-g/packetcapture2_g]
> Error 1 packetcapture2 line 0 C/C++ Problem
> > make[2]: *** [C:/ide-4.6-workspace/packetcapture2/x86/o/packetcapture2]
> Error 1 packetcapture2 line 0 C/C++ Problem
> > packetcapture2.c: undefined reference to `pcap_findalldevs' packetcapture2
> line 0 C/C++ Problem
> > packetcapture2.c: undefined reference to `pcap_freealldevs' packetcapture2
> line 0 C/C++ Problem
> > undefined reference to `pcap_findalldevs' packetcapture2.c packetcapture2
> line 15 C/C++ Problem
> > undefined reference to `pcap_freealldevs' packetcapture2.c packetcapture2
> line 38 C/C++ Problem
>
> You need to link against libpcap.
>
> Regards,
>
> -seanb
You mean I have to add libpcap in Project\linker\Extra library\pcap
I did that it gives me more error.
Description Resource Path Location Type
undefined reference to `ether_hostton' packetcapture2 line 0 C/C++ Problem
undefined reference to `freeaddrinfo' packetcapture2 line 0 C/C++ Problem
undefined reference to `freeifaddrs' packetcapture2 line 0 C/C++ Problem
undefined reference to `getaddrinfo' packetcapture2 line 0 C/C++ Problem
undefined reference to `gethostbyname' packetcapture2 line 0 C/C++ Problem
undefined reference to `getifaddrs' packetcapture2 line 0 C/C++ Problem
undefined reference to `getnetbyname' packetcapture2 line 0 C/C++ Problem
undefined reference to `getprotobyname' packetcapture2 line 0 C/C++ Problem
undefined reference to `getservbyname' packetcapture2 line 0 C/C++ Problem
undefined reference to `ioctl_socket' packetcapture2 line 0 C/C++ Problem
undefined reference to `socket' packetcapture2 line 0 C/C++ Problem
C:/QNX641/target/qnx6/x86/usr/lib\libpcap.a(pcap-bpf.o): more undefined references to `ioctl_socket' follow packetcapture2 line 0 C/C++ Problem
make[2]: *** [C:/ide-4.6-workspace/packetcapture2/x86/o-g/packetcapture2_g] Error 1 packetcapture2 line 0 C/C++ Problem
make[2]: *** [C:/ide-4.6-workspace/packetcapture2/x86/o/packetcapture2] Error 1 packetcapture2 line 0 C/C++ ProblemMohammad Dadashzadeh(deleted)2009-07-24T15:24:48Zpost34522: RE: using pcap.h
http://community.qnx.com/sf/go/post34522
For 6.4 (io-pkt) I would probably just start with:
http://svn.ott.qnx.com/view/core_networking/trunk/utils/t/tcpdump/
--
aboydAndrew Boyd(deleted)2009-07-24T15:13:24Zpost34521: Re: using pcap.h
http://community.qnx.com/sf/go/post34521
On Fri, Jul 24, 2009 at 11:09:39AM -0400, Mohammad Dadashzadeh wrote:
> Dear all,
>
> I am a beginner in using QNX. I would like to use pcap.h to capture MAC packets. I am using bellow code to read all the network devices. Code complies without any error. However, when I want to build the project it gives me below error. I would be very thankful if someone helps me.
>
> Description Resource Path Location Type
> make[2]: *** [C:/ide-4.6-workspace/packetcapture2/x86/o-g/packetcapture2_g] Error 1 packetcapture2 line 0 C/C++ Problem
> make[2]: *** [C:/ide-4.6-workspace/packetcapture2/x86/o/packetcapture2] Error 1 packetcapture2 line 0 C/C++ Problem
> packetcapture2.c: undefined reference to `pcap_findalldevs' packetcapture2 line 0 C/C++ Problem
> packetcapture2.c: undefined reference to `pcap_freealldevs' packetcapture2 line 0 C/C++ Problem
> undefined reference to `pcap_findalldevs' packetcapture2.c packetcapture2 line 15 C/C++ Problem
> undefined reference to `pcap_freealldevs' packetcapture2.c packetcapture2 line 38 C/C++ Problem
You need to link against libpcap.
Regards,
-seanbSean Boudreau(deleted)2009-07-24T15:12:09Zpost34520: using pcap.h
http://community.qnx.com/sf/go/post34520
Dear all,
I am a beginner in using QNX. I would like to use pcap.h to capture MAC packets. I am using bellow code to read all the network devices. Code complies without any error. However, when I want to build the project it gives me below error. I would be very thankful if someone helps me.
Description Resource Path Location Type
make[2]: *** [C:/ide-4.6-workspace/packetcapture2/x86/o-g/packetcapture2_g] Error 1 packetcapture2 line 0 C/C++ Problem
make[2]: *** [C:/ide-4.6-workspace/packetcapture2/x86/o/packetcapture2] Error 1 packetcapture2 line 0 C/C++ Problem
packetcapture2.c: undefined reference to `pcap_findalldevs' packetcapture2 line 0 C/C++ Problem
packetcapture2.c: undefined reference to `pcap_freealldevs' packetcapture2 line 0 C/C++ Problem
undefined reference to `pcap_findalldevs' packetcapture2.c packetcapture2 line 15 C/C++ Problem
undefined reference to `pcap_freealldevs' packetcapture2.c packetcapture2 line 38 C/C++ Problem
My code
#include <stdlib.h>
#include <stdio.h>
#include "pcap.h"
int main(int argc, char *argv[]) {
pcap_if_t *alldevs;
pcap_if_t *d;
int i=0;
char errbuf[PCAP_ERRBUF_SIZE];
printf("Welcome to the QNX Momentics IDE\n");
/* Retrieve the device list from the local machine */
if (pcap_findalldevs(&alldevs, errbuf) == -1)
{
fprintf(stderr,"Error in pcap_findalldevs_ex: %s\n", errbuf);
exit(1);
}
/* Print the list */
for(d= alldevs; d != NULL; d= d->next)
{
printf("%d. %s", ++i, d->name);
if (d->description)
printf(" (%s)\n", d->description);
else
printf(" (No description available)\n");
}
if (i == 0)
{
printf("\nNo interfaces found! Make sure WinPcap is installed.\n");
return;
}
/* We don't need any more the device list. Free it */
pcap_freealldevs(alldevs);
return EXIT_SUCCESS;
}Mohammad Dadashzadeh(deleted)2009-07-24T15:09:38Zpost33256: RE: localhost issue
http://community.qnx.com/sf/go/post33256
> telnetd and ftpd ... used to start with inetd,
> but now they do not
Really dumb question: have you uncommented them
in your /etc/inetd.conf file?
What is the output of
# hostname
and
# getconf _CS_DOMAIN
PS: as soon as dns starts giving you trouble,
immediately switch to using the -n option to
ping, -N option to telnet, etc to diagnose
what is going on.
eg:
# ping -n 127.1
Also look at the output of:
# arp -an
--
aboydAndrew Boyd(deleted)2009-07-07T13:38:02Zpost33217: localhost issue
http://community.qnx.com/sf/go/post33217
I have ported my 6.3 boot script to 6.4. This includes moving to io-pkt. I am now having an issue with telnetd and ftpd. They used to start with inetd, but now they do not. In addition, I cannot even ping localhost. I think the localhost issue may be related to my telnetd and ftpd issues. Here is the contents of my /etc/hosts file:
# Host Database
#
127.0.0.1 localhost.localdomain localhost
And here are the results of pinging localhost:
ping: Cannot resolve "localhost" (Host name lookup failure)
Does anyone have any ideas?
Thank youPaul Trepagnier2009-07-06T20:14:49Zpost32959: RE: QNET over IP on QNX 6.4.0 - automatic population of remote nodes in /net folder
http://community.qnx.com/sf/go/post32959
P.S. 69603 created to track this request - add
auto-populate to qnet dns resolver.
Don't hold your breath on this one, though.
--
aboyd www.poweredbyqnx.com/images/gat_t7.jpgAndrew Boyd(deleted)2009-07-02T13:40:57Zpost32957: RE: QNET over IP on QNX 6.4.0 - automatic population of remote nodes in /net folder
http://community.qnx.com/sf/go/post32957
> I need a automatic population of remode nodes
> list in /net folder with IP option
>
> Is there any way to do so?
I can't think of a good way to do this.
> Do i need to create a new resolver ?
That's one possibility
> Where can i get the code examples for writing
> a resolver?
Qnet resolvers can be complex because of the
multi-threading. I might suggest altering the
existing dns resolver to give it the behaviour
you want - remember, all the source to qnet is
publicly available to anyone!
I'm told svn repository viewer links work outside
the company, but I am doubtful:
http://svn.ott.qnx.com/view/core_networking/trunk/sys/lsm/qnet/nr/nr_dns
.c?revision=904&view=markup
--
aboyd www.poweredbyqnx.com/images/gat_t12.jpgAndrew Boyd(deleted)2009-07-02T13:35:38Zpost32940: QNET over IP on QNX 6.4.0 - automatic population of remote nodes in /net folder
http://community.qnx.com/sf/go/post32940
hi,
I am porting my project from QNX 6.3.0 to QNX 6.4.0.
I have issues with QNET ovet iP.
When i mount QNET over ip with dns option untill and unless i do a TDP operation on remote node,will not get it in /net list.
I need a automatic population of remode nodes list in /net folder with IP option.
Is there any way to do so?
Do i need to create a new resolver ?
Where can i get the code examples for writing a resolver?soujanya Yelchuri2009-07-02T06:07:26Zpost32737: Reg - Header length in mbuf
http://community.qnx.com/sf/go/post32737
Hi,
How to print the header length,header,data using mbuf structure?
Regards
K.SenthilSenthil K2009-06-29T15:10:54Zpost32696: Re: LSM name shown by pidin
http://community.qnx.com/sf/go/post32696
Thanks for the info! I'd pretty well determined that it has something to do with linking in library modules (including the source code of some particular library module in the build "cures" the problem), and that it was beyond my control, but it's nice to hear that someone is (hopefully!) busy working on it.
MurfJohn Murphy2009-06-29T12:58:12Zpost32691: Re: LSM name shown by pidin
http://community.qnx.com/sf/go/post32691
> I've written a number of LSM's; when I run "pidin -p io-pkt-v4-hc mem" some of
> my modules show up with the expected name (i.e., "lsm-demo.so"), but some of
> them show up with the name "zero"). After many tests and experiments, I still
> have no idea why some of them lose track of their names and show up as
> anonymous memory. Any suggestions as to how I can cure this?
>
> Murf
I believe it is known not yet fixed 'buglet' ->#PR43050.
JeevanJeevan Mathew(deleted)2009-06-29T12:26:02Zpost32689: Re: Reg- Path for mbuf.h
http://community.qnx.com/sf/go/post32689
Thanks a lotSenthil K2009-06-29T12:10:51Zpost32686: Re: Reg- Path for mbuf.h
http://community.qnx.com/sf/go/post32686
This one ? :
[core_networking] / trunk / lib / socket / public / sys -> mbuf.h
JeevanJeevan Mathew(deleted)2009-06-29T11:57:55Zpost32680: Reg- Path for mbuf.h
http://community.qnx.com/sf/go/post32680
Hi,
Any one send the path of mbuf.h file and data structure explanation for struct mbuf.
Thanks and Regards
K.SenthilSenthil K2009-06-29T10:48:24Zpost32669: RE: Reg - loading lsm-packfil.so problem
http://community.qnx.com/sf/go/post32669
Senthil,
> if i want to change any coding in packfilter module then
> instead of mounting i will reboot the PC after that i m able
> to load the lsm-packfil.so.
>
> No other way to do that...
There is no reason that I know of that you would need to restart or
reboot the PC. I think you could just slay/kill io-pkt and then restart
the service.
Regards,
EricEric Fausett2009-06-29T07:10:26Zpost32666: Re: RE: RE: Reg - loading lsm-packfil.so problem
http://community.qnx.com/sf/go/post32666
Hi Eric,
if i want to change any coding in packfilter module then instead of mounting i will reboot the PC after that i m able to load the lsm-packfil.so.
No other way to do that...
Thanks and Regards
K.SenthilSenthil K2009-06-29T05:53:40Zpost32665: RE: RE: Reg - loading lsm-packfil.so problem
http://community.qnx.com/sf/go/post32665
Senthil,
> How to un load the lsm-packfil.so module?
I don't think that it's possible. If you look at the io-pkt users guide
here:
http://www.qnx.com/developers/docs/6.4.1/io-pkt_en/user_guide/overview.h
tml
You will notice what it says in the following section:
-----
# mount and umount capabilities:
* Only io-net drivers may be both mounted and unmounted. Other
drivers may allow you to detach the driver from the stack, by using the
ifconfig iface destroy command (if the driver supports it).
* The IP stack is an integral part of io-pkt; you can't start io-pkt
without it. This means that you don't need to specify the -ptcpip option
to the stack unless there are additional parameters (e.g. prefix=) that
you need to pass to it. If you specify the -ptcpip option without
additional parameters, io-pkt accepts it with no effect.
* Protocols and enhanced stack functionality (e.g. TDP, NAT / IP
Filtering) can be mounted, but not unmounted.
-----
Specifically the last sentence implies that this packet filter module
cannot be unmounted once it has been mounted.
Regards,
EricEric Fausett2009-06-29T05:37:35Zpost32664: Re: RE: Reg - loading lsm-packfil.so problem
http://community.qnx.com/sf/go/post32664
Hi Eric,
How to un load the lsm-packfil.so module?
Thanks and Regards
K.SenthilSenthil K2009-06-29T05:18:50Zpost32663: Re: RE: Reg - loading lsm-packfil.so problem
http://community.qnx.com/sf/go/post32663
Hi Eric,
Thanks now i m able to mount.
Can you please tell how to unmount it <any command>.
Thanks and Regards
K.SenthilSenthil K2009-06-29T05:14:26Zpost32662: RE: Reg - loading lsm-packfil.so problem
http://community.qnx.com/sf/go/post32662
Senthil,
The first thing I would look at is to make sure that the library in
question 'lsm-packfil.so' exists somewhere in the library path
'LD_LIBRARY_PATH' at the time you issued the mount command. The system
log indicates it was not found.
Regards,
Eric
> While loading lsm-packfil.so, i m getting error.
>
> # mount -T io-pkt lsm-packfil.so
> mount: Can't mount / (type io-pkt)
> mount: Possible reason: No such device or address
>
>
> ----
> sloginfo
>
> Jun 29 16:13:46 2 14 0 Unable to load
> lsm-packfil.so: Library cannot be foundEric Fausett2009-06-29T05:00:29Zpost32661: Reg - loading lsm-packfil.so problem
http://community.qnx.com/sf/go/post32661
Hi ,
While loading lsm-packfil.so, i m getting error.
# mount -T io-pkt lsm-packfil.so
mount: Can't mount / (type io-pkt)
mount: Possible reason: No such device or address
----
sloginfo
Jun 29 16:13:46 2 14 0 Unable to load lsm-packfil.so: Library cannot be found
Please help on this.
Thanks and Regards
K.SenthilSenthil K2009-06-29T04:32:29Zpost31413: LSM name shown by pidin
http://community.qnx.com/sf/go/post31413
I've written a number of LSM's; when I run "pidin -p io-pkt-v4-hc mem" some of my modules show up with the expected name (i.e., "lsm-demo.so"), but some of them show up with the name "zero"). After many tests and experiments, I still have no idea why some of them lose track of their names and show up as anonymous memory. Any suggestions as to how I can cure this?
MurfJohn Murphy2009-06-10T19:33:39Zpost30310: Re: if_attach return SIGABORT
http://community.qnx.com/sf/go/post30310
On Fri, May 29, 2009 at 08:51:05AM -0400, Guillaume Varlet wrote:
> I get those messages on slogger :
>
> Feb 01 06:08:30 1 14 0 if_attach: ex_init: 16
> Feb 01 06:08:30 5 21 0 run fault pid 622635 tid 2 signal 6 code 0 ip 0xb033b879 tmp/io-pkt-v4-hcgvarlet124360136316929
pthread_mutex_init() returned EBUSY:
EBUSY
The given mutex was previously initialized and hasn't been
destroyed.
You need to use a separate struct ifnet for each interface.
-seanbSean Boudreau(deleted)2009-05-29T12:53:17Zpost30309: Re: if_attach return SIGABORT
http://community.qnx.com/sf/go/post30309
On Fri, May 29, 2009 at 06:24:30AM -0400, Guillaume Varlet wrote:
> Hello All.
>
> I've some difficulties with if_attach function :
>
> On my HW, there are several network controlers that shall be initialised at the same time.
>
> To do such, I dectect each ctrls and puts it's information in linked list.
>
> To register my driver to the network stack, I need to call if_attach each time there are ctrls on my HW.
>
> Basicaly, on my develepment system, I have 2 controlers.
>
> Strange stuff : When I call 1 time with my first controler it register the device without any problem.
>
> When I do an ifconfig I ca see my device registered.
> When the second controler is registered, I'm catching a SIGABORT signal.
> Attached, screenshot of debugger when it occurs.
>
> Do you know why this append ?
The stack probably panic()'d. Check the sloginfo for
more information. BTW the source for the stack is
in the networking repo in this project.
Regards,
-seanbSean Boudreau(deleted)2009-05-29T12:51:32Zpost30308: Re: if_attach return SIGABORT
http://community.qnx.com/sf/go/post30308
I get those messages on slogger :
Feb 01 06:08:30 1 14 0 if_attach: ex_init: 16
Feb 01 06:08:30 5 21 0 run fault pid 622635 tid 2 signal 6 code 0 ip 0xb033b879 tmp/io-pkt-v4-hcgvarlet124360136316929Guillaume Varlet2009-05-29T12:51:01Zpost30305: if_attach return SIGABORT
http://community.qnx.com/sf/go/post30305
Hello All.
I've some difficulties with if_attach function :
On my HW, there are several network controlers that shall be initialised at the same time.
To do such, I dectect each ctrls and puts it's information in linked list.
To register my driver to the network stack, I need to call if_attach each time there are ctrls on my HW.
Basicaly, on my develepment system, I have 2 controlers.
Strange stuff : When I call 1 time with my first controler it register the device without any problem.
When I do an ifconfig I ca see my device registered.
When the second controler is registered, I'm catching a SIGABORT signal.
Attached, screenshot of debugger when it occurs.
Do you know why this append ?
Thank you very much.Guillaume Varlet2009-05-29T10:23:29Zpost28224: Re: link to shared libraries *.so
http://community.qnx.com/sf/go/post28224
Hi,
I have this problem since 6.4.
If you have a dynamic library xxx.so, you get a dependency to xxx.a file.
This is a problem of the current qnx make tree.
If you make your project with eclipse, you get a ".qnx_internal.mk" included by common.mk, which solves the problem.
A not very nice workaround is to generate a dummy "xxx.a" in the library install path.
If you have installed both, "xxx.a" and "xxx.so", your build is also working.
But the make run uses the dependency for xxx.a to link against xxx.so.
Perhaps one of the gnu make Guru's can fix this pronblem. I am wondering why this hidden strange file ".qnx_install" is used with eclipse.
Regards
Michael
> Hello.
>
> On my io-net drive, it was easy to ling against shared libs.
> In my driver I need to link to a HW specific access shared lib.
>
> With io-pkt, I do not understand what happends...
>
> I entrer name of shared libs, with the dynamic parameter set, but it tries to
> load a static lib anyway...
>
> make[2]: *** No rule to make target `libmen-oss.a', needed by `G:/CVS/work/QNX
> /src/DRIVERS/devnp/men-z087/x86/dll-g/devnp-men-z087_g.so'.
>
> And if you specify the LIBS+=-Bdynamic men-oss men-dbg drvrS men-chameleon :
>
> make[2]: *** No rule to make target `lib-Bdynamic.a', needed by `G:/CVS/work/
> QNX/src/DRIVERS/devnp/men-z087/x86/dll-g/devnp-men-z087_g.so'.
> make[2]: *** No rule to make target `libmen-oss.a', needed by `G:/CVS/work/QNX
> /src/DRIVERS/devnp/men-z087/x86/dll-g/devnp-men-z087_g.so'.
> make[2]: Target `all' not remade because of errors.
>
> Why ?
>
> Thank you very much for your help.Michael Tasche2009-04-28T11:36:40Zpost28218: link to shared libraries *.so
http://community.qnx.com/sf/go/post28218
Hello.
On my io-net drive, it was easy to ling against shared libs.
In my driver I need to link to a HW specific access shared lib.
With io-pkt, I do not understand what happends...
I entrer name of shared libs, with the dynamic parameter set, but it tries to load a static lib anyway...
make[2]: *** No rule to make target `libmen-oss.a', needed by `G:/CVS/work/QNX/src/DRIVERS/devnp/men-z087/x86/dll-g/devnp-men-z087_g.so'.
And if you specify the LIBS+=-Bdynamic men-oss men-dbg drvrS men-chameleon :
make[2]: *** No rule to make target `lib-Bdynamic.a', needed by `G:/CVS/work/QNX/src/DRIVERS/devnp/men-z087/x86/dll-g/devnp-men-z087_g.so'.
make[2]: *** No rule to make target `libmen-oss.a', needed by `G:/CVS/work/QNX/src/DRIVERS/devnp/men-z087/x86/dll-g/devnp-men-z087_g.so'.
make[2]: Target `all' not remade because of errors.
Why ?
Thank you very much for your help.Guillaume Varlet2009-04-28T09:21:00Zpost28113: RE: malloc() and free() with more than 1 arg.
http://community.qnx.com/sf/go/post28113
Hi Guillaume:
One of the goals of the io-pkt design was to re-use as much of the NetBSD code as possible with as few changes as possible. NetBSD being a monolithic kernel design has all of the network stack (and drivers) running in the kernel (and this is why the KERNEL macro is defined). So the short answer is that you should use the malloc and free API in an identical manner to the drivers that are already there.
Now, that being said, I believe that the re-defines from the POSIX API to the NetBSD API comes from muf.h (although I can't remember for sure). So if you don't have any mbuf accesses in your file (and you haven't included any of the headers that pull in mbuf.h (which isn't going to be easy... trust me...)) then you might just be able to use straight malloc calls. I wouldn't advise it though.
Robert.
-----Original Message-----
From: Guillaume Varlet [mailto:community-noreply@qnx.com]
Sent: Mon 4/27/2009 6:12 AM
To: ionetmig-networking
Subject: malloc() and free() with more than 1 arg.
Hello.
I'm writting an iopkt driver based on speedo model.
I'm porting a code from io-net.
io-pkt drivers expects malloc and free with more than 1 arg such as :
free(freeptr, M_TEMP);
malloc(strlen(optstring) + 1, M_TEMP, M_NOWAIT);
wereas doc is saying :
Synopsis:
#include <stdlib.h>
void* malloc( size_t size );
Arguments:
size
The number of bytes to allocate.
Where does this macro are defined ?
Is it possible to do not use them ?
Thanks.
Guillaume
_______________________________________________
io-net migration
http://community.qnx.com/sf/go/post28109Robert Craig2009-04-27T12:01:10Zpost28112: Re: malloc() and free() with more than 1 arg.
http://community.qnx.com/sf/go/post28112
I Found the reason : _KERNEL is defined.
Is _KERNEL define mandatory to build io-pkt driver?
Thanks,
Gui.Guillaume Varlet2009-04-27T11:08:22Zpost28109: malloc() and free() with more than 1 arg.
http://community.qnx.com/sf/go/post28109
Hello.
I'm writting an iopkt driver based on speedo model.
I'm porting a code from io-net.
io-pkt drivers expects malloc and free with more than 1 arg such as :
free(freeptr, M_TEMP);
malloc(strlen(optstring) + 1, M_TEMP, M_NOWAIT);
wereas doc is saying :
Synopsis:
#include <stdlib.h>
void* malloc( size_t size );
Arguments:
size
The number of bytes to allocate.
Where does this macro are defined ?
Is it possible to do not use them ?
Thanks.
GuillaumeGuillaume Varlet2009-04-27T10:12:28Zpost24716: Re: sending data from io-pkt module upon DMA completion
http://community.qnx.com/sf/go/post24716
> On Wed, Mar 18, 2009 at 05:38:54AM -0400, Yuri Shchors wrote:
> It sounds like you may be able to attach to the interrupt like
> other drivers. Maybe check out speedo_attach() in
> sys/dev_qnx/speedo/detect.c which sets up an interrupt callout
> and ISR.
Does this mean that I can use pulse_attach or InterruptAttach in the module init routine? Does the pulse callback block other io-pkt activity?
> ifp->if_output() has to be thread safe. For example ether_output()
> generally only acts on the packet in question or checks state when
> needed. ifp->if_start() is called with the ifp->if_snd_ex mutex
> locked.
So I should call if_start before calling to if_output? I've used qnet ipv4 driver as a sample and havn't seen if_start there.Yuri Shchors(deleted)2009-03-18T16:30:24Zpost24715: Re: RE: sending data from io-pkt module upon DMA completion
http://community.qnx.com/sf/go/post24715
> Hi Yura:
>
> I'm a bit curious as to what you're trying to accomplish. Do you have a
> network card that you're trying to write a driver for or is this some
> other sort of application?
>
> Robert.
>
Hi,
I have a 533 Mhz, MPC8360 chip with DMA block and I need to push large amounts of data through it's 1Gbit ethernet MAC(up to max capacity - 125Mb/sec). The data arrives from external bus which has sufficient bandwidth. I've written standalone program that uses DMA to get the data. Now, I need to send it through the network. Writing a simple test program that sends raw IP packets, yields rather poor result (max speed about 40Mb/s), so I've decided to write io-pkt module to avoid unnecessary copying of data, since I know it's physical location.
Using mmap I can access the data brought by DMA. The io-pkt module
should make a packets from the data and send them. The problem is in getting notification from external program. The simplest way seem to be in using pulse_attach in module initialization routine and doing all the work in the pulse handler, but I don't know if it'll block rest of the io-pkt activity and in which thread's context it gets called. The thread is other possibility, which seems to be more complicated to me. Any advice is welcome.
Yura.Yuri Shchors(deleted)2009-03-18T16:19:56Zpost24696: RE: sending data from io-pkt module upon DMA completion
http://community.qnx.com/sf/go/post24696
Hi Yura:
I'm a bit curious as to what you're trying to accomplish. Do you have a
network card that you're trying to write a driver for or is this some
other sort of application?
Robert.
-----Original Message-----
From: Yuri Shchors [mailto:community-noreply@qnx.com]
Sent: Wednesday, March 18, 2009 5:39 AM
To: ionetmig-networking
Subject: sending data from io-pkt module upon DMA completion
Hi,
I'm using a chip with internal DMA block.
When DMA completes I'll get a pulse from DMA ISR.
I'm writing io-pkt module that'll send the data upon DMA completion.
Can I use pulse_attach() function and send all the data(few megabytes)
from inside the pulse handler or should I use nw_pthread_create() to
create separate thread ?
Can if_output() function be used from multiple threads/pulse handler or
some semaphore should be locked?
Thanks,
Yura
_______________________________________________
io-net migration
http://community.qnx.com/sf/go/post24654Robert Craig2009-03-18T14:44:20Zpost24677: Re: sending data from io-pkt module upon DMA completion
http://community.qnx.com/sf/go/post24677
On Wed, Mar 18, 2009 at 05:38:54AM -0400, Yuri Shchors wrote:
> Hi,
> I'm using a chip with internal DMA block.
> When DMA completes I'll get a pulse from DMA ISR.
> I'm writing io-pkt module that'll send the data upon DMA completion.
> Can I use pulse_attach() function and send all the data(few megabytes)
> from inside the pulse handler or should I use nw_pthread_create() to create separate thread ?
It sounds like you may be able to attach to the interrupt like
other drivers. Maybe check out speedo_attach() in
sys/dev_qnx/speedo/detect.c which sets up an interrupt callout
and ISR.
> Can if_output() function be used from multiple threads/pulse handler or
> some semaphore should be locked?
ifp->if_output() has to be thread safe. For example ether_output()
generally only acts on the packet in question or checks state when
needed. ifp->if_start() is called with the ifp->if_snd_ex mutex
locked.Sean Boudreau(deleted)2009-03-18T13:33:56Z