connection) socket, the actual value is: 1.socket. Sock_dgramSocket for datagram (UDP connection), the actual value is: 2.socket. Sock_rawThe actual value is: 3.socket. SOCK_RDMThe actual value is: 4.socket. Sock_seqpacketThe actual value is: 5.Other constantsSocket.has_ipv6A Boolean constant that shows whether the current platform supports the IPV6 protocol.Module methodsocket.create_connection (addr[, timeout[, source_addr])Socket.getaddrinfo (Host, port[, family[, socktype[, proto[,
state, the server hears the connection request, receives the SYN J packet, calls the Accept function to receive the request to send SYN K to the client, ACK j+ 1, then accept into the blocking state, the client receives the server SYN K, after the ACK j+1, then connect returns, and the Syn K Confirmation, the server received an ACK k+1, accept return, this three times the handshake is completed, the connection is established.
We can see the specific process through the network capture package
the master-slave DNS server region. Suppose I want to restrict other malicious clients to do address resolution for me ??? You can also set it by modifying the configuration file and adding an allow-query {! The specified IP address;};, for example:
Zone "mageedu.com" in {Type slave;File "Slaves/mageedu.com. Zone ";Masters {172.16.249.174 ;};Allow-transfer {172.16.0.0/16 ;};Allow-query {none ;};
Note that none is displayed in the last line. So I asked the primary DNS server to parse the websi
as the rwlock_t type. If a spin lock is used, wq_lock_t is defined as the spinlock_t type. In either case, configure macros such as wq_read_lock, wq_read_unlock, wq_read_lock_irqsave, empty, wq_write_lock_irq, wq_write_unlock, wq_write_lock_irqsave, and unlock.
Waiting queue Header Struct _ wait_queue_head {Wq_lock_t lock;Struct list_head task_list;};Typedef struct _ wait_queue_head wait_queue_head_t;As mentioned above, the main body of the waiting queue is a process, which is reflected in each
requests and send syn k, ack j + 1 to the client. Then, accept is blocked. After the client receives the syn k and ack j + 1 from the server, connect returns, then, confirm the syn k. When the server receives the ack k + 1, accept returns. The three handshakes are completed and the connection is established.
We can view the specific process through network packet capture: for example, our server enables port 9502. Use tcpdump to capture packets:
Tcpdump-iany tcp port 9502Then we use telnet 127.
This article is a summary of the source code. Please specify the source for the transfer. Thank you.
Welcome to your discussion. Qq: 1037701636 email: gzzaigcn2012@gmail.com
Android source code Version: 4.2.2; hardware platform A31
Based on BootAnimation, the previous blog post came to the SurfaceFlinger Surface creation process. The specific implementation was completed by the createSurface of the Client. In fact, the Surface on the client exists in the server with the name of the Layer.
Sp
" data and the sampling of "suspicious" data will pass.
Important algorithm analysis:
Static int variance_read (struct tslib_module_info * info, struct ts_sample * SAMP, int nr){Struct tslib_variance * Var = (struct tslib_variance *) Info;Struct ts_sample cur;Int COUNT = 0, DIST;
While (count If the sample data is marked as "submitted noise", assign the structure related to the current sample data to the noise status and clear the flag.If (Var-> flags
processed will be checked and executed:
1) returned from a hardware interrupt code
2) In the ksoftirqd kernel thread
3) in the code that explicitly checks and executes the Soft Interrupt to be processed, such as the network subsystem
The Soft Interrupt should be executed in the do_softirq () function:
Asmlinkage void do_softirq (void)
{
_ U32 pending;
Unsigned long flags;
If (in_interrupt ())
Return;
Local_irq_save (
std::string name; if (svc) {name = android::base::stringprintf ("Service '%s ' (PID%d)", Svc->name, PID); } else {name = android::base::stringprintf ("untracked pid%d", PID); } NOTICE ("%s%s\n", Name.c_str (), Describestatus (status). C_STR ()); if (!svc) {return true; }//Todo:all the code from here to should is a member function on service.//if the service process does not have a Svc_oneshot flag set or Svc_resta RT flag, the current process is killed before the new process is r
This chapter focuses on the memory management of the Linux kernel.
Inside of the Kmalloc function
Incorrect acquisition of memory space zeroing
The allocated area is also contiguous in physical memory
Flags, number of references
Gfp_kernel
Put the current process into hibernation while spare memory is low to wait for a page
The function that allocates memory must be ree
2017-07-20
Eventfd in Linux is a relatively new process of communication, and the semaphore is different than the event can not only be used for inter-process communication, but also the user to send signals to the user layer of the process. EVENTFD plays a significant role as a medium for vhost and KVM interaction in the implementation of Virtio back-end drive vhost. This section unifies the Linux source code to EVENTFD the concrete realization sits down the brief analysis.
possession of bio. It is ready to add a strip processing process, and a vigorous strip of people's path unfolds.A new stripe formally increases the processing queue (conf->handle_list) after 4198 rows and 4203 lines of Release_stripe_plug.The last half of man is constantly looking for the entrance. The next half of the life is constantly looking for exports. Here, read stripe found the entrance, then where is the exit? Students who have read LDD must know the answer, for block device drivers th
Regular expression matching rules
Method
Return
Parameters
Description
. Compile ()
Regex
Compiling a regular expression pattern into a regular expression object
Pattern
Regular expressions
Flags=0
Adjusts the behavior of an expression, which can be combined using the OR (|)
. A
flags=
Let,,,,,
, orBaiduMysql_query (); SQL statement. --If the query statement usage rate is mysql_query (), use Mysql_use_result () and mysql_fetch_row (); Mysql_use_result (); Returns a result set; Mysql_fetch_row (); Iterate through each row of the result set. #include "ptt_mysql.h"//if this. h file is called, there are some ways to change the name #define MAX Action () {char *server= "127.0.0.1" ; Localunsigned int port = 3306; Port number char *username = "Ndouser"; User name char *password
and minimize the enumeration space. First, let's assume that we already know the heap address. First, let's take a look at how to construct a TALLOC memory block to hijack the EIP. We need to understand the implementation of TALLOC_FREE. First, let's take a look at the structure of the TALLOC memory block:
struct talloc_chunk { struct talloc_chunk *next, *prev; struct talloc_chunk *parent, *child; struct talloc_reference_handle *refs; talloc_destructor_t destructor; const ch
/config/SMP. h ).
The file under include/config/is generated from Autoconf. h by another tool split-include. It uses the config _ mark in Autoconf. h to generate the file corresponding to mkdep. For example, if the Autoconf. h contains the line "# UNDEF config_smp", it generates the include/config/SMP. h file with the content "# UNDEF config_smp ". These file names only appear in the. Depend file, and the kernel source files are not embedded with them. Run split-include every time the kernel is
Kernel waiting queue
Kernel waiting queueCreator sz111@126.com1.Waiting queue plays an extremely important role in the kernel. As an asynchronous operation, its implementation is simple and powerful.
It uses a double-stranded table to link the waiting tast header to the waiting process list. You can see it clearly. So we know that to implement a waiting queue, there must be two parts first. Queue header and queue item. Let's look at their data structure.Struct list_head {Struct list_head * Next
defined as the spinlock_t type. In either case, configure macros such as wq_read_lock, wq_read_unlock, wq_read_lock_irqsave, empty, wq_write_lock_irq, wq_write_unlock, wq_write_lock_irqsave, and unlock.Waiting queue HeaderStruct _ wait_queue_head {Wq_lock_t lock;Struct list_head task_list;};Typedef struct _ wait_queue_head wait_queue_head_t;As mentioned above, the main body of the waiting queue is a process, which is reflected in each waiting queue item and is a task structure pointer (struct t
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.