~ubuntu-branches/ubuntu/jaunty/xorp/jaunty

« back to all changes in this revision

Viewing changes to fea/mfea_mrouter.cc

  • Committer: Bazaar Package Importer
  • Author(s): Jose Calhariz, Javier Fernandez-Sanguino, Jose Calhariz
  • Date: 2008-01-23 01:24:37 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080123012437-7l2u9r0k8e7op8st
Tags: 1.5~cvs.20080128-1
[ Javier Fernandez-Sanguino ]
* Update to latest CVS contents
* Modify debian/rules to prevent autobuilders from building 
  the binary-independent components: (Closes: #441121)
  - Create a new Build-Depends-Indep with all the TeX
  components used to build documentation
  - Since autobuilders call build, which in turns calls build-indep, hack
    the debian rules file so that the documentation is only built if ps2pdf,
    dvips and pslatex are available. 
* Modify the init.d script:
  - restart action: Do not attempt to stop xorp if not running
  - stop function: fix errors in the script
  - add a try-restart action
  - restructure the init.d script, move the restart code to a function
  - review the use of echo calls and exit values
* Use, as examples, the new boot files at rtrmgr/config/

[ Jose Calhariz ]
* Add depends on ncurses-dev, I don't know why xorp use tigetstr
  function from curses.  This way the depends field change less between
  build environments.
* Removed pushd and popd commands from Makefile and replaced with cd
  commands, was a bashism and FTBFS (closes: #453637)
* debian/control converted to utf-8 (closes: #454026) (closes: #453485)
* init.d/xorp now returns 0 if disabled.
* Added Vcs-Browser and Vcs-Svn fields pointing to the repository of the
  package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
// -*- c-basic-offset: 4; tab-width: 8; indent-tabs-mode: t -*-
2
2
 
3
 
// Copyright (c) 2001-2007 International Computer Science Institute
 
3
// Copyright (c) 2001-2008 International Computer Science Institute
4
4
//
5
5
// Permission is hereby granted, free of charge, to any person obtaining a
6
6
// copy of this software and associated documentation files (the "Software")
12
12
// notice is a summary of the XORP LICENSE file; the license in that file is
13
13
// legally binding.
14
14
 
15
 
#ident "$XORP: xorp/fea/mfea_mrouter.cc,v 1.59 2007/08/19 00:34:09 zec Exp $"
 
15
#ident "$XORP: xorp/fea/mfea_mrouter.cc,v 1.62 2008/01/05 21:29:03 pavlin Exp $"
16
16
 
17
17
//
18
18
// Multicast routing kernel-access specific implementation.
243
243
    if (is_up() || is_pending_up())
244
244
        return (XORP_OK);
245
245
 
246
 
    if (ProtoUnit::start() < 0)
 
246
    if (ProtoUnit::start() != XORP_OK)
247
247
        return (XORP_ERROR);
248
248
    
249
249
#ifndef HOST_OS_WINDOWS
275
275
    }
276
276
 
277
277
    // Start the multicast routing in the kernel
278
 
    if (start_mrt() < 0)
 
278
    if (start_mrt() != XORP_OK)
279
279
        return (XORP_ERROR);
280
280
    
281
281
    return (XORP_OK);
297
297
    if (is_down())
298
298
        return (XORP_OK);
299
299
 
300
 
    if (ProtoUnit::stop() < 0)
 
300
    if (ProtoUnit::stop() != XORP_OK)
301
301
        return (XORP_ERROR);
302
302
 
303
303
    // Stop the multicast routing in the kernel
597
597
 
598
598
    UNUSED(enable);
599
599
 
600
 
    if (multicast_forwarding_enabled4(old_value, error_msg) < 0)
 
600
    if (multicast_forwarding_enabled4(old_value, error_msg) != XORP_OK)
601
601
        return (XORP_ERROR);
602
602
 
603
603
    if (old_value == v)
668
668
 
669
669
    UNUSED(enable);
670
670
 
671
 
    if (multicast_forwarding_enabled6(old_value, error_msg) < 0)
 
671
    if (multicast_forwarding_enabled6(old_value, error_msg) != XORP_OK)
672
672
        return (XORP_ERROR);
673
673
 
674
674
    if (old_value == v)
709
709
 * 
710
710
 * Get the protocol that would be used in case of mrouter socket.
711
711
 * 
712
 
 * Return value: the protocol number on success, otherwise %XORP_ERROR.
 
712
 * Return value: the protocol number on success, otherwise -1.
713
713
 **/
714
714
int
715
715
MfeaMrouter::kernel_mrouter_ip_protocol() const
723
723
#endif // HAVE_IPV6
724
724
    default:
725
725
        XLOG_UNREACHABLE();
726
 
        return (XORP_ERROR);
 
726
        return (-1);
727
727
    }
728
728
    
729
 
    return (XORP_ERROR);
 
729
    return (-1);
730
730
}
731
731
 
732
732
/**
1326
1326
 * @rp_addr: The RP address.
1327
1327
 * 
1328
1328
 * Install/modify a Multicast Forwarding Cache (MFC) entry in the kernel.
1329
 
 * If the MFC entry specified by (@source, @group) pair was not
 
1329
 * If the MFC entry specified by (source, group) pair was not
1330
1330
 * installed before, a new MFC entry will be created in the kernel;
1331
1331
 * otherwise, the existing entry's fields will be modified.
1332
1332
 *