*/struct Array_cache *array[nr_cpus];/* 2) Cache Tu Nables. Protected by Cache_chain_mutex */unsigned int batchcount;unsigned int limit;unsigned int shared;unsigned int buffer_size; U32 reciprocal_buffer_size;/* 3) Touched by every alloc free from the backend */unsigned int flags;/* constant Flags */unsigned int num;/* # of OBJS per Slab *//* 4) Cache_grow/shrink *//* Order of pgs per slab (2^n) */unsign
,
-Shared-memory = on/off;
Enable shared memory:-enable-named-pipe = on/off;
1.3tcp/ip socket
The communication protocol described in this article is also based on this connection method, the following is a preliminary understanding of TCP/IP sockets through tcpdump:
Server:
[root@root ~]# tcpdump port 3306tcpdump: verbose output suppressed, use -v or -vv for full protocol decodelistening on venet0, link-type LINUX_SLL (Linux cooked), capture size 65535 bytes
The server listens to port 3306 (tha
). ** process all arrived time events and all ready file events. ** Without special flags the function sleeps until some file event * fires, or when the next time event occurrs (if any ). ** if no special flags is input, the function sleep until the file event is ready * or the event arrives at the next time (if any ). ** If flags is 0, the function does nothing
The functions of the RE module are described in 1. Method
match look for method: Re.match (pattern,string,flags=0) return value:
search full-text search, get only first method: Re.search (pattern,string,flags=0) return value:
findall return all content found (full-text search) method: Re.findall (pattern,string,flags=0) return value: list
This kmem_cache_create () function is a function that is related to the structure of the CPU, which is not found in the common function (3.10.98 kernel version), I chose arch/x86/kernel/Description under Parameters:The name of the const char *name:slabsize_t Size: The sizes of each objectsize_t align: alignment of each objectUnsigned long flags: Object Not enough, identity to request memoryvoid (*ctor) (void *): constructorstruct Kmem_cache *kmem_cach
use Tun devices and tap devices. Two programs are like these two netsNetwork bridge between the device interfaces.Br_select.c‐bridge based on the select system call.Br_sigio.c‐bridge based on async IO and Sigio signal.Of course, the best example is the is Vtun http://vtun.sourceforge.net:))Module_init (Tun_init);Module_exit (Tun_cleanup);/* Network Device part of the driver */Static List_head (tun_dev_list);static const struct ETHTOOL_OPS tun_ethtool_ops;Main data structuresstruct Miscdevicestr
PS: Notes are based on the linux4.9 version source code, in order to omit some code, use ' –> ' to represent the included function.
First look at the slabinfo below Proc.From the above diagram, you can see that slab has a lot of objects, according to Ulk, the cache can be dividers to two categories: the normal cache private cacheWhat difference does it have. The private cache is created by the Kmem_cache_creat () function and is used specifically with special types of objects, such as Dentry Bu
This program is a simulation of operating system experiments. We hope to provide valuable suggestions for its shortcomings.# IncludeFloat t, d;/* define two global variables */Struct/* defines a struct array, including process information */{Int id;Float arrivetime;Float servertime;Float starttime;Float finishtime;Float Turnovertime;Float bili;Int flags;} Pro [4];/* define the initialized struct array */Create ()/* assign values to the struct array, i
congestion window is increased to 3. At this time, although up to three packet segments can be sent, only two packet segments are sent before the next Ack is received.
Normal network example
In a normal network, the server is in the public network, and the client is a virtual machine. Through the client 223.226.200.34, each time the data is sent to the server 223.226.200.200 in the size of 102400, the number of cycles is 1000. The network between the two parties is good. At the beginning
tcpdump-i eth0-nn ' host 123.59.208.201 'Tcpdump:verbose output suppressed, use-v OR-VV for full protocol decodelistening on eth0, Link-type EN10MB (Ethernet), Capture Size 65535 bytesOpen a new terminal window and execute the telnet command:Date +%y%m%d-%h:%m:%s.%n;time telnet 123.59.208.201 62715;date +%y%m%d-%h:%m:%s.%n;20170526-18:04:23.764397558trying 123.59.208.201...telnet:connect to address 123.59.208.201:connection timed Outtelnet 123.59.208.201 62715 0.00s user 0.00s system 0% CPU 2:
Allocating memoryDescribes how memory is used in device drivers;How best to utilize system memory resources.Kmalloc functionThe Kmalloc memory allocation engine is a powerful tool.#include void *kmalloc (size_t size, int flags);Parameter assignment means that flags can control the behavior of Kmalloc in a variety of ways.The flag Gfp_kernel indicates that the memory allocation is performed on behalf of the
positive operator Dereference operator Fetch address operator Type conversion operator Returns the number of bytes occupied by an object
if (!done) ... flags = ~flags; for (i = 0; i for (i = ten; i > 0; i.) ... int i =-1; int i = +1; data = *ptr; Address = obj; int i = (int) floatnum; int size = sizeof (floatnum);
Right-to-left
3
->* . *
operator that a
Precedence
Operator
Description
Example
associativity
1
()[]-.::++--
Grouping operatorArray AccessMember access from a pointerMember access from a objectScoping operatorPost-incrementPost-decrement
(A + B)/4;ARRAY[4] = 2;Ptr->age = 34;Obj.age = 34;Class::age = 2;for (i = 0; i for (i = ten; i > 0; i--) ...
Left to right
2
!~++---+*(type)sizeof
Logical negationBitwise complementPre-incrementPre-decrementunary minusUnary
Priority Level
operator
Description
Example
combination of
1
()[]->.::++--
Bracket operator for adjusting precedenceArray Subscript access operatorTo access a member's operator by pointing to an object's pointerTo access a member's operator through the object itselfScope operatorPost self-increment operatorPost Self subtraction operator
(A + B)/4;ARRAY[4] = 2;Ptr->age = 34;Obj.age = 34;Class::age = 2;for (i = 0; i for (i = i > 0; i--) ...
From left to
Priority Level
operator
Description
Example
combination of
1
()[]->.::++--
Bracket operator for adjusting precedenceArray Subscript access operatorTo access a member's operator by pointing to an object's pointerTo access a member's operator through the object itselfScope operatorPost self-increment operatorPost Self subtraction operator
(A + B)/4;ARRAY[4] = 2;Ptr->age = 34;Obj.age = 34;Class::age = 2;for (i = 0; i for (i = i > 0; i--) ...
From left to
C + + Operator precedence
The operators at the top of this list are evaluated.
Precedence
Operator
Description
Example
associativity
1
::
Scoping operator
Class::age = 2;
None
2
()[]->.++--
Grouping operatorArray Accessmember access from a pointermember access from an objectPost-incrementPost-decrement
(A + B)/4;ARRAY[4] = 2;Ptr->age = 34;Obj.age = 34;for (i = 0; i for (i = i > 0; i--) ...
Left to right
Precedence
Operator
Description
Example
associativity
1
()[]->.::++--
Grouping operatorArray Accessmember access from a pointermember access from an objectScoping operatorPost-incrementPost-decrement
(A + B)/4;ARRAY[4] = 2;Ptr->age = 34;Obj.age = 34;Class::age = 2;for (i = 0; i for (i = i > 0; i--) ...
Left to right
2
! ~ + + --- + * / (type) sizeof
logical negation Bitwise complement Pre-increment Pre-decrement Unary min
have already made a reference implementation of the OS detection technique mentioned above (except what I said is not included).I added them to my nmap scanner, so what does it know about fingerprints when it's analyzed?The port is turned on or off without you telling. It can also be in Linux,*bsd, andSolaris 2.51 and 2.6, and some other operating systems are ported between.
The new version of Nmap reads a fingerprint template file. The following are examples of syntax:
Fingerprint IRIX 6.2-6.4
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.