ipcpstat
static struct ipcpstat
struct ipcpstat *ipcpstat;
ipcpstat = npppd_get_ipcp_stat(&_this->ipcpstats, ppp_ipcp(ppp)->name);
if (ipcpstat == NULL) {
ipcpstat->nsession >= ppp_ipcp(ppp)->max_session) {
LIST_INSERT_HEAD(&ipcpstat->ppp, ppp, ipcpstat_entry);
ppp->ipcpstat = ipcpstat;
ipcpstat->nsession++;
if (ppp->ipcpstat!= NULL) {
ppp->ipcpstat->nsession--;
struct ipcpstat *ipcpstat;
ipcpstat = malloc(sizeof(*ipcpstat));
if (ipcpstat == NULL) {
memset(ipcpstat, 0, sizeof(*ipcpstat));
strlcpy(ipcpstat->name, ipcpconf->name, sizeof(ipcpstat->name));
LIST_INSERT_HEAD(&_this->ipcpstats, ipcpstat, entry);
static struct ipcpstat *
struct ipcpstat *ipcpstat = NULL;
LIST_FOREACH(ipcpstat, head, entry) {
if (strncmp(ipcpstat->name, ipcp_name,
sizeof(ipcpstat->name)) == 0)
return ipcpstat;
struct ipcpstat *ipcpstat, *tipcpstat;
LIST_FOREACH_SAFE(ipcpstat, head, entry, tipcpstat) {
LIST_FOREACH_SAFE(ppp, &ipcpstat->ppp, ipcpstat_entry, tppp) {
ppp->ipcpstat = NULL;
free(ipcpstat);
struct ipcpstat *ipcpstat, *tipcpstat;
LIST_FOREACH_SAFE(ipcpstat, &_this->ipcpstats, entry, tipcpstat) {
LIST_REMOVE(ipcpstat, entry);
LIST_INSERT_HEAD(&destroy_list, ipcpstat, entry);
ipcpstat = npppd_get_ipcp_stat(&destroy_list, ipcpconf->name);
if (ipcpstat != NULL) {
LIST_REMOVE(ipcpstat, entry);
LIST_INSERT_HEAD(&_this->ipcpstats, ipcpstat, entry);
ipcpstat = malloc(sizeof(*ipcpstat));
if (ipcpstat == NULL) {
memset(ipcpstat, 0, sizeof(*ipcpstat));
strlcpy(ipcpstat->name, ipcpconf->name, sizeof(ipcpconf->name));
LIST_INSERT_HEAD(&_this->ipcpstats, ipcpstat, entry);
LIST_ENTRY(ipcpstat) entry;
LIST_HEAD(ipcpstat_head, ipcpstat);
struct ipcpstat *ipcpstat;