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

« back to all changes in this revision

Viewing changes to fea/pa_backend_pf.hh

  • 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
// vim:set sts=4 ts=8:
3
3
 
4
 
// Copyright (c) 2001-2007 International Computer Science Institute
 
4
// Copyright (c) 2001-2008 International Computer Science Institute
5
5
//
6
6
// Permission is hereby granted, free of charge, to any person obtaining a
7
7
// copy of this software and associated documentation files (the "Software")
13
13
// notice is a summary of the XORP LICENSE file; the license in that file is
14
14
// legally binding.
15
15
 
16
 
// $XORP: xorp/fea/pa_backend_pf.hh,v 1.4 2007/05/23 12:12:34 pavlin Exp $
 
16
// $XORP: xorp/fea/pa_backend_pf.hh,v 1.7 2008/01/04 03:15:50 pavlin Exp $
17
17
 
18
18
#ifndef __FEA_PA_BACKEND_PF_HH__
19
19
#define __FEA_PA_BACKEND_PF_HH__
99
99
    /* --------------------------------------------------------------------- */
100
100
    /* IPv4 ACL back-end methods. */
101
101
 
102
 
    bool push_entries4(const PaSnapshot4* snap);
103
 
    bool delete_all_entries4();
 
102
    int push_entries4(const PaSnapshot4* snap);
 
103
    int delete_all_entries4();
104
104
    const PaBackend::Snapshot4Base* create_snapshot4();
105
 
    bool restore_snapshot4(const PaBackend::Snapshot4Base* snap);
 
105
    int restore_snapshot4(const PaBackend::Snapshot4Base* snap);
106
106
 
107
107
#ifdef notyet
108
108
    /* --------------------------------------------------------------------- */
109
109
    /* IPv6 ACL back-end methods. */
110
110
 
111
 
    bool push_entries6(const PaSnapshot6* snap);
112
 
    bool delete_all_entries6();
 
111
    int push_entries6(const PaSnapshot6* snap);
 
112
    int delete_all_entries6();
113
113
    const PaBackend::Snapshot6Base* create_snapshot6() const;
114
 
    bool restore_snapshot6(const PaBackend::Snapshot6Base* snap);
 
114
    int restore_snapshot6(const PaBackend::Snapshot6Base* snap);
115
115
#endif
116
116
 
117
117
#ifdef HAVE_PACKETFILTER_PF
118
118
protected:
119
119
    /* --------------------------------------------------------------------- */
120
120
    /* Private back-end methods. */
121
 
    bool set_pf_enabled(bool enable);
122
 
    u_int32_t start_transaction();
123
 
    void abort_transaction(u_int32_t ticket);
124
 
    bool commit_transaction(u_int32_t ticket);
125
 
    bool transcribe_and_add_rule4(const PaEntry4& entry, u_int32_t ticket);
 
121
    int set_pf_enabled(bool enable);
 
122
    uint32_t start_transaction();
 
123
    void abort_transaction(uint32_t ticket);
 
124
    int commit_transaction(uint32_t ticket);
 
125
    int transcribe_and_add_rule4(const PaEntry4& entry, uint32_t ticket);
126
126
 
127
127
    // XXX: For some reason this access isn't permitted even though
128
128
    // Snapshot4 is a friend of PaPfBackend in this scope, which