Documentation
¶
Overview ¶
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
const ( IfaceNameIsNeededMsg = "the interface name is needed" IfaceValidationFaildMsg = "the interface validation failed, because" InvalidIfaceMsg = "the interface %s is not valid" InterfaceConfigInitFailedMsg = "interfaces configutation failed, because" InterfacesInitMsg = "interface intiated successfully" InterfacesListFailedMsg = "unable to list system interfaces, because" PFRingInitFaildMsg = "unable to crate new pf_ring object, because" SettingBPFFilterFailedMsg = "unable to set the BPF filter, because" EnablePFRingFailedMsg = "while enabling PFRing found" PFRingEnabledMsg = "PFRing enabled successflly" )
Variables ¶
var (
ErrIfaceNotProvided = errors.New(IfaceNameIsNeededMsg)
)
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// IFace interface to bind to
IFace string
// PFRing enable pf_ring
PFRing bool
// BPFfilter BPF filter
BPFfilter string
}
Config interface internal configuration
type Interfaces ¶
type Interfaces struct {
// Config interface's configuration most of its values come from the arguments
// or configuration file
Config *Config
}
Interfaces is in charge to manage interfaces
func (*Interfaces) InitPFRing ¶
func (iface *Interfaces) InitPFRing() (ring *pfring.Ring, err error)
InitPFRing initializes PFRing on the interface defined in the config
func (*Interfaces) PFRingEnabled ¶
func (iface *Interfaces) PFRingEnabled() bool
PFRingEnabled indicated whether PF Ring is enabled