Jun 08

The socket buffer, or “SKB”, is the most fundamental data structure in the Linux networking code. Every packet sent or received is handled using this data structure.

The most fundamental parts of the SKB structure are as follows:


struct sk_buff {
	/* These two members must be first. */
	struct sk_buff		*next;
	struct sk_buff		*prev;

	struct sk_buff_head	*list;
 ...

The first two members implement list handling. Packets can exist on several kinds of lists and queues. For example, a TCP socket send queue. The third member says which list the packet is on. Learn more about SKB list handling here.


	struct sock		*sk;

This is where we record the socket assosciated with this SKB. When a packet is sent or received for a socket, the memory assosciated with the packet must be charged to the socket for proper memory accounting. Read more about socket packet buffer memory accounting here.


	struct timeval		stamp;

Here we record the timestamp for the packet, either when it arrived or when it was sent. Calculating this is somewhat expensive, so this value is only recorded if necessary. When something happens that requires that we start recording timestamps, net_enable_timestamp() is called. If that need goes away, net_disable_timestamp() is called.

Timestamps are mostly used to packet sniffers. But they are also used to implement certain socket options, and also some netfilter modules make use of this value as well.


	struct net_device	*dev;
	struct net_device	*input_dev;
	struct net_device	*real_dev;

These three members help keep track of the devices assosciated with a packet. The reason we have three different device pointers is that the main ’skb->dev’ member can change as we encapsulate and decapsulate via a virtual device.

So if we are receiving a packet from a device which is part of a bonding device instance, initially ’skb->dev’ will be set to point the real underlying bonding slave. When the packet enters the networking (via ‘netif_receive_skb()’) we save ’skb->dev’ away in ’skb->real_dev’ and update ’skb->dev’ to point to the bonding device.

Likewise, the physical device receiving a packet always records itself in ’skb->input_dev’. In this way, no matter how many layers of virtual devices end up being decapsulated, ’skb->input_dev’ can always be used to find the top-level device that actually received this packet from the network.


	union {
		struct tcphdr	*th;
		struct udphdr	*uh;
		struct icmphdr	*icmph;
		struct igmphdr	*igmph;
		struct iphdr	*ipiph;
		struct ipv6hdr	*ipv6h;
		unsigned char	*raw;
	} h;

	union {
		struct iphdr	*iph;
		struct ipv6hdr	*ipv6h;
		struct arphdr	*arph;
		unsigned char	*raw;
	} nh;

	union {
		unsigned char	*raw;
	} mac;

Here we store the location of the various protocol layer headers as we build outgoing packets, and parse incoming ones. For example, ’skb->mac.raw’ is set by ‘eth_type_trans()’, when an eternet packet is received. Later, we can use this to find the location of the MAC header.

These members are potentially redundant, and could be removed. Read a discussion about that here.


	struct  dst_entry	*dst;

This member is the generic route for the packet. It tells us how to get the packet to it’s destination. Note that routes are used for both input and output. DST entries are about as complex as SKBs are, and thus probably deserve their own tutorial.


	struct	sec_path	*sp;

Here we store the security path traversed by the packet, if any. For example, on input IPSEC records each transformation which has been applied to the packet by a decapsulator. The records are an array of ’struct sec_decap_state’ which each record the security assosciation that matched and got applied. Later, when we are trying to validate the security policy against a packet, we make sure that the transformations applied match the ones allowed by the policy.


	char			cb[40];

This is the SKB control block. It is an opaque storage area usable by protocols, and even some drivers, to store private per-packet information. TCP uses this, for example, to store sequence numbers and retransmission state for the frame.


	unsigned int		len,
				data_len,
				mac_len,
				csum;

The three length members are pretty straight-forward. The total number of bytes in the packet is ‘len’. SKBs are composed of a linear data buffer, and optionally a set of 1 or more page buffers. If there are page buffers, the total number of bytes in the page buffer area is ‘data_len’. Therefore the number of bytes in the linear buffer is ’skb->len - skb->data_len’. There is a shorthand function for this in ’skb_headlen()’.


static inline unsigned int skb_headlen(const struct sk_buff *skb)
{
	return skb->len - skb->data_len;
}

The ‘mac_len’ holds the length of the MAC header. Normally, this isn’t really necessary to maintain, except to implement IPSEC decapsulation of IP tunnels properly. This field is initialized once inside of ‘netif_receive_skb()’ to the formula ’skb->nh.raw - skb->mac.raw’.

Since we only use this for one purpose, with some clever ideas we may be able to eliminate this member in the future. For example, perhaps we can store the value in the ’struct sec_path’.

Finally, ‘csum’ holds the checksum of the packet. When building send packets, we copy the data in from userspace and calculate the 16-bit two’s complement sum in parallel for performance. This sum is accumulated in ’skb->csum’. This helps us compute the final checksum stored in the protocol packet header checksum field. This field can end up being ignored if, for example, the device will checksum the packet for us.

On input, the ‘csum’ field can be used to store a checksum calculated by the device. If the device indicates ‘CHECKSUM_HW’ in the SKB ‘ip_summed’ field, this means that ‘csum’ is the two’s complement checksum of the entire packet data area starting at ’skb->data’. This is generic enough such that both IPV4 and IPV6 checksum offloading can be supported.


	unsigned char		local_df,
				cloned:1,
				nohdr:1,
				pkt_type,
				ip_summed;

The ‘local_df’ field is used by the IPV4 protocol, and when set allows us to locally fragment frames which have already been fragmented. This situation can arise, for example, with IPSEC.

In order to make quick references to SKB data, Linux has the concept of SKB clones. When a clone of an SKB is made, all of the ’struct sk_buff’ structure members of the clone are private to the clone. The data, however, is shared between the primary SKB and it’s clone. When an SKB is cloned, the ‘cloned’ field will be set in both the primary and clone SKB. Otherwise is will be zero.

The ‘nohdr’ field is used in the support of TCP Segmentation Offload (’TSO’ for short). Most devices supporting this feature need to make some minor modifications to the TCP and IP headers of an outgoing packet to get it in the right form for the hardware to process. We do not want these modifications to be seen by packet sniffers and the like. So we use this ‘nohdr’ field and a special bit in the data area reference count to keep track of whether the device needs to replace the data area before making the packet header modifications.

The type of the packet (basically, who is it for), is stored in the ‘pkt_type’ field. It takes on one of the ‘PACKET_*’ values defined in the ‘linux/if_packet.h’ header file. For example, when an incoming ethernet frame is to a destination MAC address matching the MAC address of the ethernet device it arrived on, this field will be set to ‘PACKET_HOST’. When a broadcast frame is received, it will be set to ‘PACKET_BROADCAST’. And likewise when a multicast packet is received it will be set to ‘PACKET_MULTICAST’.

The ‘ip_summed’ field describes what kind of checksumming assistence the card has provided for a receive packet. It takes on one of three values: ‘CHECKSUM_NONE’ if the card provided no checksum assistence, ‘CHECKSUM_HW’ if the two’s complement checksum over the entire packet has been provides in ’skb->csum’, and ‘CHECKSUM_UNNECESSARY’ if it is not necessary to verify the checksum of this packet. The latter usually occurs when the packet is received over the loopback device. ‘CHECKSUM_UNNECESSARY’ can also be used when the device only provides a ‘checksum OK’ indication for receive packet checksum offload.


	__u32			priority;

The ‘priority’ field is used in the implement of QoS. The packet’s value of this field can be determined by, for example, the TOS field setting in the IPV4 header. Then, the packet scheduler and classifier layer can key off of this SKB priority value to schedule or classify the packet, as configured by the administrator.


	unsigned short		protocol,
				security;

The ‘protocol’ field is initialized by routines such as ‘eth_type_trans()’. It takes on one of the ‘ETH_P_*’ values defined in the ‘linux/if_ether.h’ header file. Even non-ethernet devices use these ethernet protocol type values to indicate what protocol should receive the packet. As long as we always have some ethernet protocol value for each and every protocol, this should not be a problem.

The ’security’ field was meant to be used in the implementation of IP Security, but that never materialized. It can probably be safely removed. Since the next field is a pointer, and thus needs to be aligned properly, eliminating the ’security’ field would unfortunately not buy us any space savings.


	void			(*destructor)(struct sk_buff *skb);
	...
	unsigned int		truesize;

The SKB ‘destructor’ and ‘truesize’ fields are used for socket buffer accounting. See the SKB socket accounting page for details.


	atomic_t		users;

We reference count SKB objects using the ‘users’ field. Extra references can be obtained by invoking ’skb_get()’. An implicit single reference is present in the SKB (that is, ‘users’ has a value of ‘1′) when it is first allocated. References are dropped by invoking ‘kfree_skb()’.


	unsigned char		*head,
				*data,
				*tail,
				*end;

These four pointers provide the core management of the linear packet data area of an SKB. SKB data area handling is involved enough to deserve it’s very own tutorial. Check it out here.

Apr 03

ICAO (International Civil Aviation Organization) menetapkan standar komunikasi untuk penerbangan (aeronautical communication), disebut ATN (Aeronautical Telecommunication Network) menggunakan komunikasi digital untuk melengkapi komunikasi suara. ICAO ATN menspesifikasi ISO 8473 Connectionless Network Protocol (CLNP) untuk interkoneksi antara udara ke darat dan subnetwork-subnetwork darat.

Sampai tahun 1980, Navigasi berbasis terminal telah digunakan sebagai titik referensi pada penerbangan. Titik-titik tersebut berlokasi pada darat dan sinyal dikirim oleh Non Directional Beacon (NDB). Jenis radar untuk menempatkan posisi pesawat terbang. Itu memiliki kecepatan sepuluh revolusi tiap menit atau enam detik untuk tiap revolusi. Itu dapat mencapai sampai 500 mil laut. Sayangnya, ini tidak mencukupi dan cukup memuaskan untuk mengatur lalu lintas udara.

Pada 1983, ICAO menugaskan penemuan konsep dan teknologi baru di bidang sistem navigasi udara ke komite khusus FANS (Future Air Navigation System). Konsep yang diusulkan bernama CNS/ATM (Communication Navigation Surveillance / Air Traffic Management) pada 11 Mei 1998 pada Worldwide CNS.ATM Systems Implementation Conference di Rio de Janeiro. ICAO menginstruksikan penggunaan CNS/ATM oleh semua anggota ICAO pada konferensi di Chicago dengan batas waktu tahun 2015.

Sistem CNS/ATM melibatkan sekumpulan teknologi kompleks dan saling terkait yang sangat bergantung pada satelit-satelit. Sistem navigasi lama berbasis bumi diperkenalkan pada 1940. Sistem ini memerlukan ribuan unit kendali lalu lintas, stasiun-stasiun relay berbasis darat dan navigasi radio yang intensif. Pada CNS/ATM, hanya dengan tiga atau empat satelit maka sebagain besar dunia telah dapat dicakup.

Untuk mencapai penerapan CNS/ATM, ICAO membuat standar baru komunikasi penerbangan menggunakan komunikasi digital, yaitu ATN yang merupakan infrastruktur komunikasi internasional yang mengelola transfer data digital di antara pesawat-pesawat dan fasilitas-fasilitas kendali lalu lintas udara sipil.

ATN telah dispesifikasikan untuk menyediakan layanan komunikasi data untuk layanan lalu lintas udara (Air Traffic Services/ATS). Organisasi penyedia beberapa tipe lalu lintas komunikasi :

1. Air Traffic Services Communication (ATSC)

2. Aeronautical Operational Control (AOC)

3. Aeronautical Administrative Communication (AAC)

4. Aeronautical Passenger Communication (APC)

ATN menyediakan standar komunikasi antara perusahaan penerbangan dan unit-unit ATS. Hubungan ini mencakup komunikasi darat ke darat dan udara ke darat. Aplikasi ATN dan ATM menawarkan beberapa keuntungan diatas sistem komunikasi suara konvesional.

ATN direkomendasikan untuk diimplementasi setiap Negara. Jumlah kecukupan ATN dibutuhkan untuk meliputi semua wilayah negara. Pada kenyataannya masih terdapat beberapa negara yang belum memenuhi peraturan ini. Indonesia merupakan salah satunya. Sekarang ini, Indonesia hanya menerapkan dua ATN, di Jakarta dan Makassar. Daerah-daerah lain masih menggunakan Aeronautical Fixed Telecommunication Network (AFTN) yang berdasar komunikasi suara.

Feb 02

i got this video from CBS, really, i think that google earth ability is getting insane.. you can track down the movement of a fish!!

Feb 02

just watch this video.


Watch CBS Videos Online

Feb 02

This is my first time getting on air on KBS Radio, Seoul South Korea. the funny parts are : 

kita rekaman di Korea tapi pakai bahasa Indonesia, hehehe.. dengerin deh bahasa Indonesia logat Korea, LOL

nama acaranya: Opini Kawula Muda.

you can visit the KBS website here : http://world.kbs.co.kr/

atau dengarkan saja disini … hehehe

Feb 02

ada beberapa kebiasaan baru yang muncul semenjak tinggal disini.
belakangan ini saya lebih seneng streaming lagu daripada download, (soalnya menuh-menuhin harddisk sih..) biasanya sih buka playlist.com.. (hahaha promosi)
kemudian, saya juga punya hobi lain, yakni video-walking, klo g mau nyebut youtube-walking.. hehe mencuri istilah dari blogwalk..

saat blogwalking videowalking itulah saya menemukan video dari Kavana - Will You Wait for Me.
hahaha lagu jadul, tahun 1999, jaman itu saya masih SMP kayaknya..

terus jadi iseng2 nyari lagu jadul yang dulu disukai.. dapet father and son, smile like monalisa, stay the same, sama back for good
terciptalah playlist berikut… maybe i’ll try to add some more later.. enjoy..

Jan 31

liburan seminggu menjadikan kegiatan ber-online-ria menjadi-jadi..

salah satu efek yang sangat terlihat adalah tingkat kerapian desktop,

gambar dibawah menunjukan betapa “rapi”nya desktop sayah.. hehehe


kondisi awal, cuma DUA slot tersisa! hahahaha…


mulai dirapikan,

yeah, this is better…

semakin baik bung..

yak dikit lagi…

beuh.. mantabs.. eh, bentar..

hahahaha.. kenapa gak di hide dari awal ya??
:P

Jan 29

Ok, judulnya sudah cukup menjelaskan apa yang akan saya tulis selanjutnya, tapi saya hanya mau bilang, ini beneran kejadian nyata..

Seorang gadis muda di Argentina memiliki 7 orang anak, dari 3 kali melahirkan!! 1-3-3. ini sudah mirip formasi sepakbola bagi saya… -_-; kutipan artikel dari web sumber :

This is really outrageous. Argentine teenager Pamela Villarruel poses with her seven children outside her parents’ home in the town of Leones in Cordoba Province, northern Argentina, May 11, 2008. Pamela, 17, bore all seven children in just three pregnancies, having her first boy in 2005 when she was 14 and the other six girls in two deliveries of triplets in the following two years. Pamela and her children currently sleep in the living room of her mother Magdalena who supports them all by house cleaning. The father of Pamela’s first son abandoned them, the father of the first set of triplets was forced out of the house by the family for beating her, and Pamela refuses to identify the father of the more recent triplets. Magdalena requested to have her daughter’s fallopian tubes tied to avoid any further pregnancies, but was denied as Argentine law prohibits the procedure to be done on minors.

Saya kehabisan kata-kata ini.. enggak tau mau ngomong apa lagi.. berikut gambar-gambarnya.. (klik untuk lebih jelas..)

(dikutip dari binscorner)

Jan 19

http://ramallahonline.com

Ramallah, 05-01-09: Mustafa Barghouthi, the Secretary General of the Palestinian National Initiative, called this morning on the international press for an un-biased media coverage on the recent attacks on the Gaza Strip that have killed more than 545 Palestinians in a week.

Today, holidays are over, “and the international press has now to look behind the ‘Israeli truth’ presented on the mainstream media, and the constant Israeli discourse claiming for self-defence and the un-intentional killing of civilians”, he said.

“It is needed to highlight the deep causes of the massacres and the media they are going to face a choice of whether or not to accept the story that Israel has repeated over and over again”, Dr. Barghouthi emphasized, presenting some counter arguments to challenge the Israeli narratives:

1. ‘Israel left the Gaza Strip in 2005 ’. The occupation of the Strip has not only remained after 2005, it has intensified. Though there were no longer settlers and soldiers on the ground, Israel controlled the borders, the airspace and the waterways of the Strip and has laid a heavy siege to Gaza for nearly two years. Now Israel is bringing back full-ground occupation of Gaza.

2. ‘Palestinians are responsible for the Cease Fire’s Failure’. Israel has not respected the terms of the cease-fire from the very beginning: The siege of the Gaza Strip was never lifted, and the region remained a humanitarian catastrophe throughout the entirety of the cease-fire. During the last year of Annapolis and the truce, Israelis killed 546 people, of which 76 children and 2/3 in Gaza.

3. ‘You cannot compare Israeli violence to Palestinian violence’ . This assertion is true, but not in the way that Israeli spokespeople try to spin it. They are already more than 545 dead and 2,650 injured, of which among 40% of civilians. In this same period, 5 Israelis have died, and over a dozen have been injured. Before the Israeli latest attacks on Gaza, no single Israeli was killed by the missiles.

4. ‘We are targeting Hamas, civilians are their fault’ . For over a week, Israelis have strafed the Gaza Strip in over 500 unhindered missions with thousands of tons of explosives. They have fired upon Gaza by sea and now have moved soldiers into the most densely populated region of the world. They claim to ‘warn’ Palestinians by dropping leaflets from airplanes but fail to mention that there is no place to flee the fighting. There are 7,000 people/ square mile. Israeli calls the dead of children “collateral damage”.

5. ‘There is no humanitarian crisis in Gaza’. Though this has been repeated by Israeli spokespeople, they have yet to produce a single credible organization who agrees on the assumption. Dozens of Human Rights and Humanitarian Aid organizations have asserted the fact there was a crisis prior to the attack, and since is better defined a humanitarian catastrophe.

6. ‘Every country would act the same way’ . Countries would indeed protect its civilians from attack; and many may use the same overwhelming force. However, no other country is responsible for brutally occupying another against international law for over four decades. The cause of all violence is occupation.

Israel says it want to stop missiles but still, they refused talks for a renewed cease-fire and are rather expanding full military occupation.

For a week now, attacks have increased without any serious intervention the international community, and despite the millions of citizens around the world who gathered in solidarity with the Gazans, calling on their governments to act. On the day of the visit of Nicolas Sarkozy in the Region, and on the edge of the new Czech Presidency of the EU, Mustafa Barghouthi calls on the International community governments to take actions now. “ It is now time to end the massacre, time for Israel to stop its aggression on Palestinian civilians, and time for the International Community to take its responsibilities and condemn the Israeli bloodbath and impose a ceasefire,” said Dr. Mustafa Barghouthi.

Jan 18

barusan lagi browsing informasi soal israel-palestina. menemukan banyak fakta-fakta mengejutkan. mengejutkan karena bikin speechless.. ini dia :

1. Jewish Terrorist 1944 - 1948

list lengkap aksi teror yang dilakukan sekelompok Teroris Yahudi (bukan Palestine!) untuk mengusir inggris agar merestui didirikannya negara Israel. pembunuhan dan penculikan terhadap warga negara Inggris di wilayah palestina.

selengkapnya lihat di : http://www.doublestandards.org/unbunche.html

2. List Lengkap Ethnic Cleansing 1948

list lengkap yang bikin speechless. si empu web bahkan membuat list lengkap tersebut dalam bentuk placeholder list di GoogleEarth. saya coba lihat, dan ini lah gambarnya:

Tiap titik merah adalah satu “kampung”, mau tau jumlahnya? 396 villages!!!

http://www.webgaza.net/background/Palestine1948/index.htm

3. Link Video Tentang “Al Nakba”–The Palestinian Catastrophe of 1948

Menunjukan kondisi Palestina Pra-1948 dan Pasca-1948.

4. Video tentang penjelasan “pencurian legal” Israel atas Palestine.

mereka dikasi 55%, dan palestina dapet 45%. (offered by UN), dan Palestine sudah menerima,

dan lihat apa yang Israel Lakukan….

http://www.webgaza.net/background/The_Story_of_Palestine.htm