linux kernel ipv6

Code flow chart sendto recvfrom +———————————————————————-+ | | | +——–+ +————-+ | | | sendto | Application | recvfrom | | | +—-+—+ +——+——+ | | | | | +————+————————————+——————–+ | | ————-+————————————+———————- | | +————v————————————v——————–+ | Socket Interface | +—–+—+————————————————————+ | +————————————+ ^ ^ | +—————–+————–+ | +—–+———————-+——-+ +——-+—————–+———+ | | | | | | | | | | UDP +——-+—–+ | | | TCP +—–+——-+ | | | | udp_recvmsg | | | | | tcp_recvmsg | | | +-v———–+ +————-+ | |+——v——+ +————-+ | | | udp_sendmsg | +————-+ | || tcp_sendmsg | +————-+ | | +——+——+ | udp_rcv | | |+——+——| | tcp_v4_rcv | | | | +————-+ | | | +————-+ | | | ^ | | | ^ | +———-+——————–+—-+ +——-+—————–+———+ +———-+——————–+————–+—————–+———+ | v | v | | | +————————+ | +—————+ | | | | ip_push_pending_frames | | | ip_queue_xmit | | | | +—-+——————-+ | +—–+———+ | | | | +———————-+————–+ | | | | | +—————-+ +———————–+ | | | v v v | | | | | +———–+ +—–+————-+ +——-+——–+——–+| | | ip_output | | ip_forward_finish | | ip_local_deliver_finish || | +—+——-+ +——————-+ +————————-+| | v ^ ^ | |+——————-+ +—–+——+ +——-+———-+ | || ip_finish_output2 | | ip_forward | | ip_local_deliver | | |+—–+————-+ +————+ +——————+ | | | ^ ^ | | v +——————-+ | | | +———————+ +–+—-+——-+ | | | Neighbor sub system | | ip_rcv_finish | | | +————–+——+ +—————+ | | | ^ | | | +—-+—-+ | | IP | | ip_rcv | | | | +———+ | | | ^ | +—————-+—————————————+—————–+ | | +—————-v—————————————+—————–+ | +—————-+ +—-+—–+ | | | dev_queue_xmit | Driver Interface | netif_rx | | | +——-+——–+ +———-+ | | | ^ | +—————-+—————————————+—————–+ | | +—————-v—————————————+—————–+ | +—————— +—+—-+ | | | net_send_packet | Driver | net_rx | | | +—————–+ +——–+ | +————————————————————————–+

openstack network

Local Vlan Vlan Compute node 1. qbrXXX: linux bridge, q-quantum, br-bridge 1. qvbXXX/qvoXXX: a veth pair devices, connect bridge and OVS q-quantum, v-veth, b-bridge, o-open vswitch 1. int-br-eth1 and phy-br-eth1 a veth pair devices, connect br-int and br-eth1 Vlan network node 1. qr-YYY and qg-VVV: q-quantum, r-router, g-gateway qr-YYY have a internal ip, and qg-VVV have an external ip, and they are connected by iptables NAT rules. 1. phy-br-ex and

kpatch how to

git clone kpatch repo from https://github.com/dynup/kpatch.git config kernel src repo since we need src.rpm package install dependence package for kpatch yum install -y gcc kernel-devel elfutils elfutils-devel for kpatch-build 1 2 3 4 5 yum install -y rpmdevtools pesign yum-utils yum-builddep kernel debuginfo-install kernel yum install -y elfutils-devel zlib-devel binutils-devel newt-devel python-devel perl-ExtUtils-Embed audit-libs-devel numactl-devel pciutils-devel generate a patch exactly the same kernel with the one we will build.

breakfast

转自: http://bbs.tianya.cn/post-96-663904-1.shtml Weibo: http://weibo.com/mamadeniuniu 幸福从早餐开始 番茄虾仁瑶柱面,蒸南瓜,小酱菜 杂粮米糊+厚蛋烧+榨菜丁 鸡汤年糕 杂粮米胡+泡菜饼+苹果香蕉 厚蛋烧,用山药、红枣、莲子

linux network manager

1 2 3 #!/bin/bash echo hi {% highlight bash%} #!/bin/bash echo hi {% endhighlight %} {% highlight c %} #include <stdlib.h> #include <string.h> #include <arpa/inet.h> #include <net/if.h> #include <ifaddrs.h> int main(int argc, char *argv[]) { struct ifaddrs *addrs, *iap; struct sockaddr_in *sa; char buf[32]; getifaddrs(&addrs); for (iap = addrs; iap != NULL; iap = iap->ifa_next) { if (iap->ifa_addr && (iap->ifa_flags & IFF_UP) && iap->ifa_addr->sa_family == AF_INET) { sa = (struct sockaddr_in *)(iap->ifa_addr); inet_ntop(iap->ifa_addr->sa_family, (void *)&(sa->sin_addr), buf, sizeof(buf)); if (!