NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
nfd::PrivilegeHelper Class Reference

#include <privilege-helper.hpp>

Classes

class  Error
 represents a serious seteuid/gid failure More...
 

Static Public Member Functions

static void initialize (const std::string &userName, const std::string &groupName)
 
static void drop ()
 
template<class F >
static void runElevated (F &&f)
 

Detailed Description

Definition at line 35 of file privilege-helper.hpp.

Member Function Documentation

◆ initialize()

void nfd::PrivilegeHelper::initialize ( const std::string &  userName,
const std::string &  groupName 
)
static

Definition at line 45 of file privilege-helper.cpp.

References NFD_LOG_TRACE.

Referenced by nfd::general::onConfig().

◆ drop()

void nfd::PrivilegeHelper::drop ( )
static

Definition at line 122 of file privilege-helper.cpp.

References NFD_LOG_INFO, NFD_LOG_TRACE, NFD_LOG_WARN, and ndn::to_string().

Referenced by nfd::Nfd::initialize(), and runElevated().

◆ runElevated()

template<class F >
static void nfd::PrivilegeHelper::runElevated ( F &&  f)
inlinestatic

Definition at line 70 of file privilege-helper.hpp.

References drop().

Referenced by nfd::face::bindToDevice().


The documentation for this class was generated from the following files: