
3 Feb
2012
3 Feb
'12
1:25 p.m.
On Thursday 19 January 2012 19:53:21 Joe Hershberger wrote:
--- a/net/net.c +++ b/net/net.c
+int +NetUpdateEther(struct Ethernet_t *et, uchar *addr, uint prot) +{
- ushort protlen;
- memcpy(et->et_dest, addr, 6);
- memcpy(et->et_src, NetOurEther, 6);
- protlen = ntohs(et->et_protlen);
- if (protlen == PROT_VLAN) {
struct VLAN_Ethernet_t *vet = (struct VLAN_Ethernet_t *)et;
vet->vet_type = htons(prot);
return VLAN_ETHER_HDR_SIZE;
- } else if (protlen > 1514) {
et->et_protlen = htons(prot);
return ETHER_HDR_SIZE;
- } else {
/* 802.2 + SNAP */
et->et_prot = htons(prot);
return E802_HDR_SIZE;
- }
+}
seems to overlap a bit with NetSetEther. can't you have one use the other ? -mike