/*Select Next Protocol*/
switch(ntohs(ethh->ether_type)){
case ETHERTYPE_IP:
+ nnew.h=new->h;
+ nold.h=old->h;
if(!ipv4_encap(&nnew, &nold)){
return 0;
}
switch(iph->protocol){
case 0x21:
/*DCCP*/
+ nnew.h=new->h;
+ nold.h=old->h;
nnew.src_id=iph->saddr;
nnew.dest_id=iph->daddr;
if(!convert_packet(&nnew, &nold)){
/*Select Next Protocol*/
switch(ntohs(slh->sll_protocol)){
case ETHERTYPE_IP:
+ nnew.h=new->h;
+ nold.h=old->h;
if(!ipv4_encap(&nnew, &nold)){
return 0;
}