⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ptask.h

📁 思科路由器仿真器,用来仿7200系列得,可以在电脑上模拟路由器-Cisco router simulator, used to fake a 7200 series can be simulated
💻 H
字号:
/* * Cisco 7200 (Predator) simulation platform. * Copyright (c) 2005,2006 Christophe Fillot (cf@utc.fr) * * Periodic tasks centralization. */#ifndef __PTASK_H__#define __PTASK_H__#include <sys/types.h>#include <sys/socket.h>#include <sys/un.h>#include "utils.h"/* ptask identifier */typedef m_int64_t ptask_id_t;/* periodic task callback prototype */typedef int (*ptask_callback)(void *object,void *arg);/* periodic task definition */typedef struct ptask ptask_t;struct ptask {   ptask_id_t id;   ptask_t *next;   ptask_callback cbk;   void *object,*arg;};/* Add a new task */ptask_id_t ptask_add(ptask_callback cbk,void *object,void *arg);/* Remove a task */int ptask_remove(ptask_id_t id);/* Initialize ptask module */int ptask_init(u_int sleep_time);#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -