checksum when switching between source and dest addresses in IP header - newbie

2006-09-26 Thread John Que
Hello, I am not familiar with the details of checksum algorithm of ip headers; My question is this: When switching between source and dest addresses in an IP header of an IP packet - should the checksum of the ip header be changed ? Or is the checksum algorithm indifferent to which is the IP sr

Re: time stamps of skb packets in NF_HOOKS callbacks

2006-08-17 Thread John Que
17/06, Evgeniy Polyakov <[EMAIL PROTECTED]> wrote: On Thu, Aug 17, 2006 at 05:37:15PM +0300, John Que ([EMAIL PROTECTED]) wrote: > Hello, > I am using NF_HOOKS (a "PRE_ROUTING" hook). > When I try to print the time stamps (sec and usec) of skb packets > which I recieve >

Re: time stamps of skb packets in NF_HOOKS callbacks

2006-08-17 Thread John Que
implications for adding this method which can create troubles ? I must say that I am NOT On 8/17/06, Evgeniy Polyakov <[EMAIL PROTECTED]> wrote: On Thu, Aug 17, 2006 at 05:37:15PM +0300, John Que ([EMAIL PROTECTED]) wrote: > Hello, > I am using NF_HOOKS (a "PRE_ROUTING"

time stamps of skb packets in NF_HOOKS callbacks

2006-08-17 Thread John Que
Hello, I am using NF_HOOKS (a "PRE_ROUTING" hook). When I try to print the time stamps (sec and usec) of skb packets which I recieve in the hook callback I get 0. Other skb fileds are correct. According to my understanding, the time stamp should be updated when the packet is received. Isn't it so

Re: Two I/O memory regions in /proc/iomem for a NIC

2006-07-02 Thread John Que
wards when running cat /proc/iomem? As I understand, indeed this is the case. Regards, John On 7/2/06, Jeff Garzik <[EMAIL PROTECTED]> wrote: On Sun, Jul 02, 2006 at 10:24:10AM +0300, John Que wrote: > Hello, > > I had noticed that there are machines where > if I ran cat /pro

Two I/O memory regions in /proc/iomem for a NIC

2006-07-02 Thread John Que
Hello, I had noticed that there are machines where if I ran cat /proc/iomem I see one I/O memory region for the NIC I am using; while there are other machines where I see 2 regions for the NIC I/O memory. For example, on a machine with e1000 NIC adapter, I see the following 2 I/O memory regions

Re: [linux-usb-devel] [PATCH RFC] ZyDAS ZD1211 USB-WLAN driver

2006-06-04 Thread John Que
r never will request an irq"? -- John On 6/4/06, Oliver Neukum <[EMAIL PROTECTED]> wrote: Am Sonntag, 4. Juni 2006 18:29 schrieb John Que: > I had noticed that the zd1211 driver does call request_irq() in zd1205_open(), > file zd1205.c; grepping for request_irq() in the rewrite dr

Re: [linux-usb-devel] [PATCH RFC] ZyDAS ZD1211 USB-WLAN driver

2006-06-04 Thread John Que
Hello, I must confess I don't know much about the ZyDas driver and the rewrite dirver, but folliowing this post I looked a bit at the code (of both zd1211 and the rewrite version) and I have a little question; this may be seen as a (little) off topic but I will be happy if somebody will raise th

Re: determine outgoing interface (eth0,eth1) for a packet according to the dest IP

2006-04-26 Thread John Que
for such examples and did not get much. I saw that the zebra project and iproute uses netlinks but it is complex., TIA John On 4/25/06, Andi Kleen <[EMAIL PROTECTED]> wrote: > On Tuesday 25 April 2006 16:44, John Que wrote: > > Thanks a lot ! > > > > I had tried the s

Re: determine outgoing interface (eth0,eth1) for a packet according to the dest IP

2006-04-25 Thread John Que
do I specify that certain dest IP ? Regards, John On 4/25/06, Andi Kleen <[EMAIL PROTECTED]> wrote: > On Tuesday 25 April 2006 09:31, John Que wrote: > > Hello, > > What is the right way to determine on which interface card > > (eth0 or eth1) will a packet be sen

determine outgoing interface (eth0,eth1) for a packet according to the dest IP

2006-04-25 Thread John Que
Hello, What is the right way to determine on which interface card (eth0 or eth1) will a packet be sent (according to the dest IP)? I have a machine with two NICS (eth0 and eth1). I have 2 different gateways. I need to know on which interface (eth0 or eth1) will the packet be send according to the

linux networking kernel layer and STREAMS

2006-01-15 Thread John Que
Hello, I wonder if can anybody can say what is the advantages/disadvantages of the linux networking kernel layer comapred to STREAMS network layer (of Solaris for examples). >From my experience up to day , I am used to it that the Linux took the best of all worlds. I don't know very much about

Re: sendfile system call and UDP sockets

2005-11-08 Thread John Que
Hello, Thanks. I use 2.6.11-1 kernel ,Fedora Core 4. Here is the program I use and the error I get after I send one UDP packet to this machine on the port it listens on ,9000. (Note : input.txt is a nonempty small input file.) #include #include #include #include #include #include #in

Re: Interrupts and NF_HOOKS

2005-11-08 Thread John Que
ECTED]> wrote: > On Sat, Oct 29, 2005 at 03:39:30PM +0200, John Que wrote: > > Hello, > > I have written a module which uses NF_HOOKS for diverting packets to > > a different destination. > > > > My hook uses NF_IP_PRE_ROUTING. > > > > I ca

Re: Interrupts and NF_HOOKS

2005-11-08 Thread John Que
Hello, Thanks a lot for your answer ! Following your answer I did some reading in LDD3 I want to verify that I understood the interrupts mechanism right: NF_IP_FORWARD On 10/30/05, Harald Welte <[EMAIL PROTECTED]> wrote: > On Sat, Oct 29, 2005 at 03:39:30PM +0200, John Que wrote:

sendfile system call and UDP sockets

2005-11-08 Thread John Que
Hello, Is it possible to use the sendfile system call with UDP sockets in linux kernel ? I saw in net/ipv4/udp.c a comment made by Hirokazu Takahashi, which says "sendfile() on UDP works now." (this is in the linux 2.6.* kernels). But when I am trying to write a user space program which tries u

Network Card which checksum

2005-07-28 Thread John Que
Hello, One of the possible policies for skb->ip_summed is CHECKSUM_HW. In this case the device can perform checksums in hardware. According to Linux Device Drivers 3, an example of a such network card is the SPARC HME interface. I looked a bit at the code (it's in /drivers/net/sunhme.c)

Losing many many packets in a large,consecutive calls to sendTo - why ?

2005-07-17 Thread John Que
Hello, I wrote a simple , user space program (in "C") which opens 400 UDP sockets ; each of them sends a message. I saw in the sniffer that many packets are not sent. I am working with 2.4.20-8 kernel. I am creating 400 DIFFERENT instances of socket in the usual way : socket(AF_INET,SOCK_