linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Re: HELP: Linux Net Driver confusions
       [not found] <393C11DD.1EDA3EC1@lucent.com>
@ 2000-06-06 21:28 ` Tom Roberts
  2000-06-06 21:52   ` Dan Malek
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Roberts @ 2000-06-06 21:28 UTC (permalink / raw)
  Cc: linuxppc-embedded


Tom Roberts wrote:
> I am trying to write a network driver [...]
> In particular, I am trying to use non-ethernet headers, and cannot
> get the kernel to deliver a ping packet (ICMP protocol) back to the
> ping program even though the driver delivers the packets OK. BUT --
> essentially the same driver does seem to work on PowerPC linux....

Thanks to Jonathan Brauer, I got it to work.

Remarkably, the value in skb->protocol is in network byte order,
not the natural byte order of the current CPU. So changing:
	skb->protocol = ETH_P_IP;
to:
	skb->protocol = htons(ETH_P_IP);
made it work.

Note that the PowerPC byte order is the same as network order,
which is why it worked on the PowerPC but not the i586.

	[sent to both c.o.l.dev.sys and linuxppc-embedded
	 because I queried both.]


Tom Roberts	tjroberts@lucent.com

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: HELP: Linux Net Driver confusions
  2000-06-06 21:28 ` HELP: Linux Net Driver confusions Tom Roberts
@ 2000-06-06 21:52   ` Dan Malek
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Malek @ 2000-06-06 21:52 UTC (permalink / raw)
  To: Tom Roberts; +Cc: linuxppc-embedded


Tom Roberts wrote:

> Note that the PowerPC byte order is the same as network order,
> which is why it worked on the PowerPC but not the i586.

Damn!  Darwin keeps letting me down.  Those wrong byte order
things just keep surviving.  You had it working and should have just
continued down the path of happiness.......:-).


	-- Dan

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-06-06 21:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <393C11DD.1EDA3EC1@lucent.com>
2000-06-06 21:28 ` HELP: Linux Net Driver confusions Tom Roberts
2000-06-06 21:52   ` Dan Malek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).