[Linux-decnet-commit] CVS: latd interfaces-linux.cc,1.9,1.10
Brought to you by:
chrissie_c,
ph3-der-loewe
From: Patrick C. <pa...@us...> - 2006-03-17 09:45:09
|
Update of /cvsroot/linux-decnet/latd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6167 Modified Files: interfaces-linux.cc Log Message: Listen for LAT solicit messages too. Index: interfaces-linux.cc =================================================================== RCS file: /cvsroot/linux-decnet/latd/interfaces-linux.cc,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** interfaces-linux.cc 24 Mar 2004 16:53:53 -0000 1.9 --- interfaces-linux.cc 17 Mar 2006 09:41:29 -0000 1.10 *************** *** 274,277 **** --- 274,292 ---- } + /* This is the LAT solicit address */ + pack_info.mr_address[0] = 0x09; + pack_info.mr_address[1] = 0x00; + pack_info.mr_address[2] = 0x2b; + pack_info.mr_address[3] = 0x02; + pack_info.mr_address[4] = 0x01; + pack_info.mr_address[5] = 0x04; + + if (setsockopt(fd, SOL_PACKET, PACKET_ADD_MEMBERSHIP, + &pack_info, sizeof(pack_info))) + { + syslog(LOG_ERR, "can't add lat socket multicast : %m\n"); + return -1; + } + return 0; } *************** *** 302,305 **** --- 317,336 ---- return -1; } + + /* This is the LAT solicit address */ + pack_info.mr_address[0] = 0x09; + pack_info.mr_address[1] = 0x00; + pack_info.mr_address[2] = 0x2b; + pack_info.mr_address[3] = 0x02; + pack_info.mr_address[4] = 0x01; + pack_info.mr_address[5] = 0x04; + + if (setsockopt(fd, SOL_PACKET, PACKET_DROP_MEMBERSHIP, + &pack_info, sizeof(pack_info))) + { + syslog(LOG_ERR, "can't remove socket multicast : %m\n"); + return -1; + } + return 0; } |