23 #include <linux/module.h>
24 #include <linux/types.h>
25 #include <linux/kernel.h>
26 #include <linux/string.h>
28 #include <linux/socket.h>
31 #include <linux/netdevice.h>
34 #include <linux/errno.h>
37 #include <asm/uaccess.h>
48 const void *
daddr,
const void *
saddr,
unsigned int len)
51 struct hippi_cb *hcb = (
struct hippi_cb *) skb->cb;
55 printk(
"hippi_header(): length not supplied\n");
62 hip->
fp.fixed =
htonl(0x04800018);
63 hip->
fp.d2_size =
htonl(len + 8);
65 hip->
le.double_wide = 0;
66 hip->
le.message_type = 0;
68 hip->
le.dest_addr_type = 2;
69 hip->
le.src_addr_type = 2;
77 hip->
snap.oui[0] = 0x00;
78 hip->
snap.oui[1] = 0x00;
79 hip->
snap.oui[2] = 0x00;
84 memcpy(hip->
le.dest_switch_addr, daddr + 3, 3);
85 memcpy(&hcb->ifield, daddr + 2, 4);
98 static int hippi_rebuild_header(
struct sk_buff *skb)
133 skb_reset_mac_header(skb);
134 hip = (
struct hippi_hdr *)skb_mac_header(skb);
141 return hip->
snap.ethertype;
151 if ((new_mtu < 68) || (new_mtu > 65280))
165 if (netif_running(dev))
187 static const struct header_ops hippi_header_ops = {
188 .create = hippi_header,
189 .rebuild = hippi_rebuild_header,
193 static void hippi_setup(
struct net_device *dev)