My Linux API】的更多相关文章

封装获取网络信息Linux—API类 封装好的库: #ifndef NETINFORMATION_H #define NETINFORMATION_H #include <netdb.h>//包含gethostbyname gethostbyaddr #include <netinet/in.h> class NetInformation { private: struct hostent *hostInformation; struct servent *hostServer;…
@图形界面与命令行界面切换 Linux预设提供了六个命令窗口终端机让我们来登录.默认我们登录的就是第一个窗口,也就是tty1,这个六个窗口分别为tty1,tty2 … tty6,你可以按下Ctrl + Alt + F1 ~ F6 来切换它们.如果你安装了图形界面,默认情况下是进入图形界面的,此时你就可以按Ctrl + Alt + F1 ~ F6来进入其中一个命令窗口界面.当你进入命令窗口界面后再返回图形界面只要按下Ctrl + Alt + F7 就回来了.如果你用的vmware 虚拟机,命令窗口…
获取当前执行路径:getcwd1. API之网络函数 WNetAddConnection 创建同一个网络资源的永久性连接 WNetAddConnection2 创建同一个网络资源的连接 WNetAddConnection3 创建同一个网络资源的连接 WNetCancelConnection 结束一个网络连接 WNetCancelConnection2 结束一个网络连接 WNetCloseEnum 结束一次枚举操作 WNetConnectionDialog 启动一个标准对话框,以便建立同网络资源的…
现在到docker的实施阶段, 其底层的namespace,cgroup应该深入了解了. 其调用的API也慢慢熟悉起来吧. #include <unistd.h> #include <stdio.h> int main() { pid_t fpid; //int count = 0; fpid = fork(); ) printf("error in fork!"); ) { printf("I am child. Process id is %d\n…
做DPI,写协议栈的时候,处理到了urgent数据包.突然好奇应用层是如何控制发出urgent包的呢?而接收端又是如何知道,接受到了urgent包的呢? man 7 tcp,中有如下一段: TCP supports urgent data. Urgent data is used to signal the receiver that some important message is part of the data stream and that it should be processed…
#include<unistd.h> #include<stdio.h> int main() { ]; ]; pipe(filedes); printf("my pid is %u.\r\n",getpid()); /* 实测发现,子进程不会输出上面这句话,表示子进程从这开始的 */ ) {/* 父进程运行 */ /* 对于父进程:fork()返回子进程的PID */ /* 对于子进程:fork()返回0 */ char s[] = "hello,w…
对象 操作 Linux API Windows API 线程 创建 pthread_create() CreateThread() 退出 pthread_exit() ThreadExit() 等待 pthread_join() WaitForSingleObject() 互斥锁 创建 pthread_mutex_init() CreateMutex() 销毁 pthread_mutex_destroy() CloseHandle() 加锁 pthread_mutex_lock() WaitFo…
转自:https://www.linuxtv.org/downloads/legacy/video4linux/API/V4L2_API/spec-single/v4l2.html Video for Linux Two API Specification Revision 2.6.32 Michael H Schimek <mschimek@gmx.at> Bill Dirks Original author of the V4L2 API and documentation. Hans V…
转自:http://blog.csdn.net/jmq_0000/article/details/7536805#t136 Video for Linux Two API Specification Revision 0.24 Michael H Schimek <mschimek@gmx.at> Bill Dirks Hans Verkuil Martin Rubli Copyright © 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 20…