|
94 | 94 | { |
95 | 95 | listSET_LIST_ITEM_OWNER( &( pxIRD->xListItem ), ( void * ) pxIRD ); |
96 | 96 | /* Quick and dirty assignment of end-point. This will probably have to be re-designed and re-done. */ |
97 | | - /* ToDo: make sure we also join the IPv6 multicast group */ |
| 97 | + /* ToDo: make sure we also join the IPv6 multicast group */ |
98 | 98 | pxIRD->pxEndPoint = NULL; |
99 | | - pxIRD->xMCastGroupAddress.xIs_IPv6 = pdFALSE_UNSIGNED; |
100 | | - pxIRD->xMCastGroupAddress.xIPAddress.ulIP_IPv4 = ipLLMNR_IP_ADDR; |
| 99 | + pxIRD->xMCastGroupAddress.xIs_IPv6 = pdFALSE_UNSIGNED; |
| 100 | + pxIRD->xMCastGroupAddress.xIPAddress.ulIP_IPv4 = ipLLMNR_IP_ADDR; |
101 | 101 | BaseType_t bReportItemConsumed = xAddIGMPReportToList( pxIRD ); |
102 | 102 |
|
103 | 103 | if( pdTRUE != bReportItemConsumed ) |
|
259 | 259 | const ListItem_t * pxIterator; |
260 | 260 | const ListItem_t * xEnd = listGET_END_MARKER( &xIGMP_ScheduleList ); |
261 | 261 | MCastReportData_t * pxMRD; |
262 | | - NetworkInterface_t * pxInterface; |
263 | | - NetworkEndPoint_t * pxEndPoint; |
| 262 | + NetworkInterface_t * pxInterface; |
| 263 | + NetworkEndPoint_t * pxEndPoint; |
264 | 264 |
|
265 | 265 | for( pxIterator = ( const ListItem_t * ) listGET_NEXT( xEnd ); pxIterator != ( const ListItem_t * ) xEnd; pxIterator = ( const ListItem_t * ) listGET_NEXT( pxIterator ) ) |
266 | 266 | { |
|
280 | 280 |
|
281 | 281 | if( pxMRD->ucCountDown == 1 ) |
282 | 282 | { |
283 | | - pxEndPoint = pxMRD->pxEndPoint; |
284 | | - /* If the end-point is null, the report is for all interfaces. */ |
285 | | - if ( pxEndPoint == NULL) |
286 | | - { |
287 | | - for( pxInterface = FreeRTOS_FirstNetworkInterface(); |
288 | | - pxInterface != NULL; |
289 | | - pxInterface = FreeRTOS_NextNetworkInterface( pxInterface ) ) |
290 | | - { |
291 | | - for( pxEndPoint = FreeRTOS_FirstEndPoint( pxInterface ); |
292 | | - pxEndPoint != NULL; |
293 | | - pxEndPoint = FreeRTOS_NextEndPoint( pxInterface, pxEndPoint ) ) |
294 | | - { |
295 | | - if ( pxEndPoint->bits.bIPv6 == pdTRUE_UNSIGNED ) |
296 | | - { |
297 | | - /* ToDo: handle ICMPv6 reports*/ |
298 | | - continue; |
299 | | - } |
300 | | - |
301 | | - /* Make sure the end-point has an IP address */ |
302 | | - if ( pxEndPoint->ipv4_settings.ulIPAddress != 0 ) |
303 | | - { |
304 | | - pxMRD->ucCountDown = 0; |
305 | | - xSendIGMP( 0, ipIGMP_MEMBERSHIP_REPORT_V2, 0, pxMRD->xMCastGroupAddress.xIPAddress.ulIP_IPv4, pxEndPoint ); |
306 | | - } |
307 | | - else |
308 | | - { |
309 | | - } |
310 | | - } |
311 | | - } |
312 | | - } |
313 | | - else |
314 | | - { |
315 | | - /* Make sure the end-point has an IP address */ |
316 | | - if ( pxEndPoint->ipv4_settings.ulIPAddress != 0 ) |
317 | | - { |
318 | | - pxMRD->ucCountDown = 0; |
319 | | - xSendIGMP( 0, ipIGMP_MEMBERSHIP_REPORT_V2, 0, pxMRD->xMCastGroupAddress.xIPAddress.ulIP_IPv4, pxEndPoint ); |
320 | | - } |
321 | | - } |
| 283 | + pxEndPoint = pxMRD->pxEndPoint; |
| 284 | + |
| 285 | + /* If the end-point is null, the report is for all interfaces. */ |
| 286 | + if( pxEndPoint == NULL ) |
| 287 | + { |
| 288 | + for( pxInterface = FreeRTOS_FirstNetworkInterface(); |
| 289 | + pxInterface != NULL; |
| 290 | + pxInterface = FreeRTOS_NextNetworkInterface( pxInterface ) ) |
| 291 | + { |
| 292 | + for( pxEndPoint = FreeRTOS_FirstEndPoint( pxInterface ); |
| 293 | + pxEndPoint != NULL; |
| 294 | + pxEndPoint = FreeRTOS_NextEndPoint( pxInterface, pxEndPoint ) ) |
| 295 | + { |
| 296 | + if( pxEndPoint->bits.bIPv6 == pdTRUE_UNSIGNED ) |
| 297 | + { |
| 298 | + /* ToDo: handle ICMPv6 reports*/ |
| 299 | + continue; |
| 300 | + } |
| 301 | + |
| 302 | + /* Make sure the end-point has an IP address */ |
| 303 | + if( pxEndPoint->ipv4_settings.ulIPAddress != 0 ) |
| 304 | + { |
| 305 | + pxMRD->ucCountDown = 0; |
| 306 | + xSendIGMP( 0, ipIGMP_MEMBERSHIP_REPORT_V2, 0, pxMRD->xMCastGroupAddress.xIPAddress.ulIP_IPv4, pxEndPoint ); |
| 307 | + } |
| 308 | + else |
| 309 | + { |
| 310 | + } |
| 311 | + } |
| 312 | + } |
| 313 | + } |
| 314 | + else |
| 315 | + { |
| 316 | + /* Make sure the end-point has an IP address */ |
| 317 | + if( pxEndPoint->ipv4_settings.ulIPAddress != 0 ) |
| 318 | + { |
| 319 | + pxMRD->ucCountDown = 0; |
| 320 | + xSendIGMP( 0, ipIGMP_MEMBERSHIP_REPORT_V2, 0, pxMRD->xMCastGroupAddress.xIPAddress.ulIP_IPv4, pxEndPoint ); |
| 321 | + } |
| 322 | + } |
322 | 323 | } |
323 | 324 | } |
324 | 325 |
|
|
365 | 366 | pxIterator = ( const ListItem_t * ) listGET_NEXT( pxIterator ) ) |
366 | 367 | { |
367 | 368 | pxIRD = ( MCastReportData_t * ) listGET_LIST_ITEM_OWNER( pxIterator ); |
368 | | - |
369 | | - if ( pxIRD->xMCastGroupAddress.xIs_IPv6 == pdTRUE_UNSIGNED ) |
370 | | - { |
371 | | - /* ToDo: handle IPv6 */ |
372 | | - continue; |
373 | | - } |
| 369 | + |
| 370 | + if( pxIRD->xMCastGroupAddress.xIs_IPv6 == pdTRUE_UNSIGNED ) |
| 371 | + { |
| 372 | + /* ToDo: handle IPv6 */ |
| 373 | + continue; |
| 374 | + } |
374 | 375 |
|
375 | 376 | if( pxIRD->xMCastGroupAddress.xIPAddress.ulIP_IPv4 == pMCastGroup->imr_multiaddr.s_addr ) |
376 | 377 | { |
|
0 commit comments