1
1
// -*- c-basic-offset: 4; tab-width: 8; indent-tabs-mode: t -*-
2
2
// vim:set sts=4 ts=8:
4
// Copyright (c) 2001-2007 International Computer Science Institute
4
// Copyright (c) 2001-2008 International Computer Science Institute
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.
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 $
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. */
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);
108
108
/* --------------------------------------------------------------------- */
109
109
/* IPv6 ACL back-end methods. */
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);
117
117
#ifdef HAVE_PACKETFILTER_PF
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);
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