[Olsr-cvs] olsrd-current/lib/bmf/src Bmf.c, 1.11, 1.12 NetworkInterfaces.c, 1.13, 1.14
Bernd Petrovitsch
(spam-protected)
Thu Nov 29 19:10:13 CET 2007
- Previous message: [Olsr-cvs] olsrd-current/lib/txtinfo/src olsrd_txtinfo.h,1.2,1.3
- Next message: [Olsr-cvs] olsrd-current/src build_msg.c, 1.40, 1.41 duplicate_set.c, 1.20, 1.21 hna_set.c, 1.27, 1.28 ipc_frontend.c, 1.41, 1.42 link_set.c, 1.78, 1.79 lq_packet.c, 1.33, 1.34 mid_set.c, 1.25, 1.26 mpr_selector_set.c, 1.21, 1.22 neighbor_table.c, 1.36, 1.37 packet.c, 1.27, 1.28 parser.c, 1.38, 1.39 process_package.c, 1.47, 1.48 rebuild_packet.c, 1.26, 1.27 routing_table.c, 1.36, 1.37 tc_set.c, 1.38, 1.39
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/olsrd/olsrd-current/lib/bmf/src
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4460/lib/bmf/src
Modified Files:
Bmf.c NetworkInterfaces.c
Log Message:
* removed the commented out COPY_IP() and COMP_IP() macros - everything seems to work
Index: NetworkInterfaces.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/lib/bmf/src/NetworkInterfaces.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** NetworkInterfaces.c 29 Nov 2007 00:49:40 -0000 1.13
--- NetworkInterfaces.c 29 Nov 2007 18:10:11 -0000 1.14
***************
*** 1469,1475 ****
* address from the OLSR interface object. Downcast to correct sockaddr
* subtype. */
- //COPY_IP(&newIf->intAddr, &((struct sockaddr_in *)&olsrIntf->int_addr)->sin_addr.s_addr);
newIf->intAddr.v4 = ((struct sockaddr_in *)&olsrIntf->int_addr)->sin_addr;
- //COPY_IP(&newIf->broadAddr, &((struct sockaddr_in *)&olsrIntf->int_broadaddr)->sin_addr.s_addr);
newIf->broadAddr.v4 = ((struct sockaddr_in *)&olsrIntf->int_broadaddr)->sin_addr;
}
--- 1469,1473 ----
***************
*** 1489,1493 ****
{
/* Downcast to correct sockaddr subtype */
- //COPY_IP(&newIf->intAddr, &((struct sockaddr_in *)&ifr.ifr_addr)->sin_addr.s_addr);
newIf->intAddr.v4 = ((struct sockaddr_in *)&ifr.ifr_addr)->sin_addr;
}
--- 1487,1490 ----
***************
*** 1506,1510 ****
{
/* Downcast to correct sockaddr subtype */
- //COPY_IP(&newIf->broadAddr, &((struct sockaddr_in *)&ifr.ifr_broadaddr)->sin_addr.s_addr);
newIf->broadAddr.v4 = ((struct sockaddr_in *)&ifr.ifr_broadaddr)->sin_addr;
}
--- 1503,1506 ----
***************
*** 1623,1627 ****
/* ...find the OLSR interface structure, if any */
- //COPY_IP(&ipAddr, &((struct sockaddr_in*)&ifr->ifr_addr)->sin_addr.s_addr);
ipAddr.v4 = ((struct sockaddr_in*)&ifr->ifr_addr)->sin_addr;
olsrIntf = if_ifwithaddr(&ipAddr);
--- 1619,1622 ----
***************
*** 1866,1870 ****
iph = (struct iphdr*) ipPacket;
- //COPY_IP(&destIp, &iph->daddr);
destIp.v4.s_addr = iph->daddr;
if (! IsMulticast(&destIp))
--- 1861,1864 ----
***************
*** 1875,1879 ****
origDaddr = ntohl(iph->daddr);
- //COPY_IP(&iph->daddr, broadAddr);
iph->daddr = broadAddr->v4.s_addr;
newDaddr = ntohl(iph->daddr);
--- 1869,1872 ----
Index: Bmf.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/lib/bmf/src/Bmf.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** Bmf.c 29 Nov 2007 00:49:40 -0000 1.11
--- Bmf.c 29 Nov 2007 18:10:11 -0000 1.12
***************
*** 180,184 ****
/* Start by filling in the local broadcast address */
- //COPY_IP(&forwardTo.sin_addr.s_addr, &intf->broadAddr);
forwardTo.sin_addr = intf->broadAddr.v4;
--- 180,183 ----
***************
*** 203,207 ****
if (BmfMechanism == BM_UNICAST_PROMISCUOUS || nPossibleNeighbors <= 2)
{
- //COPY_IP(&forwardTo.sin_addr.s_addr, &bestNeighborLinks.links[i]->neighbor_iface_addr);
forwardTo.sin_addr = bestNeighborLinks.links[i]->neighbor_iface_addr.v4;
}
--- 202,205 ----
***************
*** 272,276 ****
ipHeader = GetIpHeader(encapsulationUdpData);
- //COPY_IP(&dst, &ipHeader->ip_dst);
dst.v4 = ipHeader->ip_dst;
--- 270,273 ----
***************
*** 304,308 ****
ipPacketLen = GetIpTotalLength(ipPacket);
- //COPY_IP(&src, &ipHeader->ip_src);
src.v4 = ipHeader->ip_src;
--- 301,304 ----
***************
*** 610,616 ****
ipHeader = GetIpHeader(encapsulationUdpData);
- //COPY_IP(&mcSrc, &ipHeader->ip_src);
mcSrc.v4 = ipHeader->ip_src;
- //COPY_IP(&mcDst, &ipHeader->ip_dst);
mcDst.v4 = ipHeader->ip_dst;
--- 606,610 ----
***************
*** 797,801 ****
/* Compose destination of encapsulation packet.
* Start by filling in the local broadcast address. */
- //COPY_IP(&forwardTo.sin_addr.s_addr, &walker->broadAddr);
forwardTo.sin_addr = walker->broadAddr.v4;
--- 791,794 ----
***************
*** 822,826 ****
/* For unicast, overwrite the local broadcast address which was filled in
* above */
- //COPY_IP(&forwardTo.sin_addr.s_addr, &bestNeighborLinks.links[i]->neighbor_iface_addr);
forwardTo.sin_addr = bestNeighborLinks.links[i]->neighbor_iface_addr.v4;
}
--- 815,818 ----
***************
*** 902,906 ****
/* Only forward multicast packets. If configured, also forward local broadcast packets */
- //COPY_IP(&dstIp, &ipHeader->ip_dst);
dstIp.v4 = ipHeader->ip_dst;
--- 894,897 ----
***************
*** 916,920 ****
}
- //COPY_IP(&srcIp, &ipHeader->ip_src);
srcIp.v4 = ipHeader->ip_src;
--- 907,910 ----
***************
*** 1201,1207 ****
}
- //COPY_IP(&forwardedBy, &ipHeader->ip_src);
forwardedBy.v4 = ipHeader->ip_src;
- //COPY_IP(&forwardedTo, &ipHeader->ip_dst);
forwardedTo.v4 = ipHeader->ip_dst;
BmfEncapsulationPacketReceived(
--- 1191,1195 ----
***************
*** 1245,1249 ****
} /* if (nBytes < 0) */
- //COPY_IP(&forwardedBy, &from.sin_addr.s_addr);
forwardedBy.v4 = from.sin_addr;
--- 1233,1236 ----
- Previous message: [Olsr-cvs] olsrd-current/lib/txtinfo/src olsrd_txtinfo.h,1.2,1.3
- Next message: [Olsr-cvs] olsrd-current/src build_msg.c, 1.40, 1.41 duplicate_set.c, 1.20, 1.21 hna_set.c, 1.27, 1.28 ipc_frontend.c, 1.41, 1.42 link_set.c, 1.78, 1.79 lq_packet.c, 1.33, 1.34 mid_set.c, 1.25, 1.26 mpr_selector_set.c, 1.21, 1.22 neighbor_table.c, 1.36, 1.37 packet.c, 1.27, 1.28 parser.c, 1.38, 1.39 process_package.c, 1.47, 1.48 rebuild_packet.c, 1.26, 1.27 routing_table.c, 1.36, 1.37 tc_set.c, 1.38, 1.39
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Olsr-cvs
mailing list