ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/gvpe/src/ether_emu.C
(Generate patch)

Comparing gvpe/src/ether_emu.C (file contents):
Revision 1.8 by pcg, Thu Aug 7 17:54:27 2008 UTC vs.
Revision 1.9 by root, Tue Feb 8 23:13:48 2011 UTC

51 } 51 }
52}; 52};
53 53
54static struct ether_emu ether_emu; 54static struct ether_emu ether_emu;
55 55
56bool 56bool
57ether_emu::tun_to_tap (tap_packet *pkt) 57ether_emu::tun_to_tap (tap_packet *pkt)
58{ 58{
59 int dst; 59 int dst;
60 60
61 if (pkt->is_ipv4 ()) 61 if (pkt->is_ipv4 ())
97 id2mac (dst, pkt->dst); 97 id2mac (dst, pkt->dst);
98 98
99 return true; 99 return true;
100} 100}
101 101
102bool 102bool
103ether_emu::tap_to_tun (tap_packet *pkt) 103ether_emu::tap_to_tun (tap_packet *pkt)
104{ 104{
105 if (pkt->is_arp ()) 105 if (pkt->is_arp ())
106 { 106 {
107 u32 ip_src = *(u32 *)&(*pkt)[28]; 107 u32 ip_src = *(u32 *)&(*pkt)[28];

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines