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

« back to all changes in this revision

Viewing changes to fea/data_plane/fibconfig/fibconfig_entry_set_dummy.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/data_plane/fibconfig/fibconfig_entry_set_dummy.cc,v 1.8 2007/07/17 23:24:24 pavlin Exp $"
 
15
#ident "$XORP: xorp/fea/data_plane/fibconfig/fibconfig_entry_set_dummy.cc,v 1.10 2008/01/04 03:15:59 pavlin Exp $"
16
16
 
17
17
#include "fea/fea_module.h"
18
18
 
77
77
}
78
78
 
79
79
 
80
 
bool
 
80
int
81
81
FibConfigEntrySetDummy::add_entry4(const Fte4& fte)
82
82
{
83
83
    if (in_configuration() == false)
84
 
        return false;
 
84
        return (XORP_ERROR);
85
85
 
86
86
    if (fte.is_connected_route()) {
87
87
        // XXX: accept directly-connected routes
96
96
                     fte.net().str().c_str(), rc, fibconfig().trie4().route_count());
97
97
    }
98
98
    
99
 
    return true;
 
99
    return (XORP_OK);
100
100
}
101
101
 
102
 
bool
 
102
int
103
103
FibConfigEntrySetDummy::delete_entry4(const Fte4& fte)
104
104
{
105
105
    if (in_configuration() == false)
106
 
        return false;
 
106
        return (XORP_ERROR);
107
107
 
108
108
    if (fte.is_connected_route()) {
109
109
        // XXX: accept directly-connected routes
111
111
    
112
112
    Trie4::iterator ti = fibconfig().trie4().find(fte.net());
113
113
    if (ti == fibconfig().trie4().end())
114
 
        return false;
 
114
        return (XORP_ERROR);
115
115
    fibconfig().trie4().erase(ti);
116
116
    
117
 
    return true;
 
117
    return (XORP_OK);
118
118
}
119
119
 
120
 
bool
 
120
int
121
121
FibConfigEntrySetDummy::add_entry6(const Fte6& fte)
122
122
{
123
123
    if (in_configuration() == false)
124
 
        return false;
 
124
        return (XORP_ERROR);
125
125
 
126
126
    if (fte.is_connected_route()) {
127
127
        // XXX: accept directly-connected routes
137
137
                     fibconfig().trie6().route_count());
138
138
    }
139
139
    
140
 
    return true;
 
140
    return (XORP_OK);
141
141
}
142
142
 
143
 
bool
 
143
int
144
144
FibConfigEntrySetDummy::delete_entry6(const Fte6& fte)
145
145
{
146
146
    if (in_configuration() == false)
147
 
        return false;
 
147
        return (XORP_ERROR);
148
148
 
149
149
    if (fte.is_connected_route()) {
150
150
        // XXX: accept directly-connected routes
152
152
    
153
153
    Trie6::iterator ti = fibconfig().trie6().find(fte.net());
154
154
    if (ti == fibconfig().trie6().end())
155
 
        return false;
 
155
        return (XORP_ERROR);
156
156
    fibconfig().trie6().erase(ti);
157
157
    
158
 
    return true;
 
158
    return (XORP_OK);
159
159
}