~ubuntu-branches/debian/squeeze/smcroute/squeeze

« back to all changes in this revision

Viewing changes to src/mcsender.c

  • Committer: Bazaar Package Importer
  • Author(s): Julien BLACHE
  • Date: 2006-06-01 13:09:15 UTC
  • Revision ID: james.westby@ubuntu.com-20060601130915-uor8evbkftmg2bjp
Tags: 0.92-1
Initial release (closes: #369785).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <stdio.h>
 
2
#include <unistd.h>
1
3
 
2
4
#include "mclab.h"
3
5
 
10
12
 
11
13
int main( int ArgCn, char *ArgVc[] )
12
14
{
13
 
  char *TargetArg;
14
 
 
15
15
  if( ArgCn < 2 ) {
16
16
USAGE:
17
17
    printf( Usage );
53
53
 
54
54
    if( setsockopt( UdpSock, IPPROTO_IP, IP_MULTICAST_TTL, 
55
55
                    &Ttl, sizeof( Ttl ) ) )
56
 
      log( LOG_ERR, errno, "set IP_MULTICAST_TTL" );
 
56
      smclog( LOG_ERR, errno, "set IP_MULTICAST_TTL" );
57
57
      
58
58
    while( 1 ) {
59
59
      if( send( UdpSock, McMsg, sizeof( McMsg ), 0 ) != sizeof( McMsg ) )
60
 
        log( LOG_WARNING, errno, "send to UDP socket" );
 
60
        smclog( LOG_WARNING, errno, "send to UDP socket" );
61
61
 
62
62
      sleep( 1 );
63
63
    }