LinuxÍøÂç½Ø°ü²»ÍêÈ«ÕûÀí
ÍøÂç½Ø°üÊÇÒ»ÏîºÜÓÐÒâ˼µÄ¿ÎÌ⣬¿ÉÒÔÓÐÊý¾Ý¹ýÂË£¬·À»ðǽ£¬Á÷Á¿¿ØÖÆ£¬±¨ÎĴ۸ĵÈÖî¶àÓ¦Ó㬰´ÕÕÄں˷ֲã¼Ü¹¹½«Ò»Ð©½Ø°ü·½·¨²»ÍêÈ«ÕûÀíÈçÏ£¬»¶Ó²¹³ä¡£
1¡¢ L1²ãÇý¶¯½Ø°ü·¨
ÔÚÇý¶¯ÖÐÏÂÊÖÓ¦¸Ã¿ÉÒÔ˵ÊÇ×îÌù½üµ×²ãµÄ£¬Íø¿¨Çý¶¯ÖÐ×ÜÓÐrx½ÓÊÕºÍxmit·¢Ëͺ¯Êý£¬²ÎÊý×ÜÊÇsk_buffer£¬ÔÚÕâÀïÐ޸ĺܻƺܱ©Á¦£¬¶øÇÒ¼¸ºõ²»ÐèҪʲôlinuxÄں˵Ä֪ʶ¡£
xmitº¯Êýµ÷ÓÃʱµÄ²ÎÊýsk_bufferÒѾÊÇÒ»¸ö·¢Óý½¡È«µÄ³ÉÊìÌ壬Òò´ËÔÚÕâÀï×ö¹ýÂËÄÇÕæÊǵÃÐÄÓ¦ÊÖÃÀ´ôÁË£¬µ±È»Ð޸ĵÄʱºò»¹ÊÇÒªÏÂÒ»·¬¹¦·ò£¬¶ørxµÄʱºòÔòÏà·´£¬¿ÉÁ¯µÄsk_bufferÔÚÕâʱºòÖ»·¢ÓýÁËÁ´Â·²ã(L2)Í·²¿£¬Ò»µ©Éæ¼°µ½½ÏΪ¸´ÔӵĹýÂË£¬ÔòÐèÒª×öһЩģÄâÐÒéÕ»µÄ·ÖÎö£¬ÈçÐèÒª»ñÈ¡udp¶Ë¿Ú£¬¾ÍÒª´Ósk_bufferÖÐÏÈÈ¡³öL3 IP²ãµÄ³¤¶È£¬¶Ôsk_buffer->data×÷ÏàӦλÒÆ¡£
2¡¢ L2²ãÐéÄâÉ豸½Ø°ü·¨
Óë¾ßÌåÍø¿¨É豸Î޹أ¬Í¨¹ýregister_netdevice×¢²áÒ»¸önet_device½á¹¹£¬ÔÚÇý¶¯²ãÉÏÐéÄâÒ»¸öÉ豸½Úµã(ethx.y)£¬À´ÊµÏֽذü£¬Í¨¹ýÉèÖ÷ÓÉ£¬ÈÃÐèÒªÀ¹½ØµÄ±¨ÎÄͨ¹ý¸ÃÉ豸½Úµã·¢³ö£¬´Ó¶øʵÏÖ¹ýÂË¡£
ÕýÊÇÒòΪÐèÒª½áºÏ·ÓÉÀ´Ê¹Ó㬸÷½·¨ÏÔµÃÌرðÓÅÑÅ£¬¶ÔÄ¿µÄIPµÄ¹ýÂËÉõÖÁÔÚ·ÓÉÉèÖÃÖоÍÒѾÍê³É£¬±ÜÃâÆäËûÎ޹ر¨ÎIJ»±ØÒªµÄÀ¹½ØÅжϡ£ÐéÄâÉ豸À¹½Øµ½µÄsk_bufferÒ²ÒѾ»ù±¾³ÉÊìÁË£¬¿ÉÒÔ·½±ãµÄ¹ýÂË¡£
¿Éϧ·ð˵£¬Óŵ㼴ȱµã£¬ÕýÊÇÒòΪÐèÒª½áºÏ·ÓÉʹÓ㬸÷¨¶Ô½ÓÊÕ±¨ÎĵĹýÂ˺ÍÐÞ¸ÄÎÞÄÜΪÁ¦(Èç¹ûÀí½âÓÐÎó»¶ÓÖ¸Õý)¡£
3¡¢ L3²ã×Ô¶¨ÒåÐÒé½Ø°ü·¨
ÓÖÊǷdz£ÓÅÑŵÄ×ö·¨£¬Í¨¹ýdev_add_pack×¢²ápacket_type½á¹¹£¬¹Ò½ÓÉÏ×Ô¶¨ÒåÐÒéµÄÊÕ·¢Á÷³Ì£¬¾ÍËãLinuxÉý¼¶µ½3.0 4.0£¬¹À¼ÆÒ²ÄÜÇáÒ×µÄÒÆÖ²¡£
¿Éϧ¸Ã·½·¨Ö»ÄÜÀ¹½Ø½ÓÊյı¨ÎÄ£¬¶øÇÒÖ»ÄÜÀ¹½Ø¸ÃÐÒéµÄ±¨ÎÄ£¬¶àÓÃÓÚÕý¹æÐÒ鿪·¢£¬²»ÊÊÓÃÓÚһЩС¹¦ÄÜʵÏÖ¡£
4¡¢ L3²ãnetfilter½Ø°ü·¨
netfilterÊÇlinuxÄÚºË×Ô´øµÄÕý¹æ·À»ðǽ£¬×ªÒ»¸önetfilter¹³×Ó·Ö²¼Í¼£º
¿ÉÒÔ·¢ÏÖ£¬netfilter¹³×ÓËäÈ»²»¶à£¬µ«ÊDZ鲼ÐÒéÕ»µÄ¸÷¸ö¹Ø¼ü·¾¶£¬Í¨¹ýÕâЩ¹³×ӾͿÉÒÔ»ù±¾ÊµÏÖ¶þ²ãÒÔÉϱ¨ÎĵĹýÂ˺Íɾ¸Ä¡£
5¡¢ Ó¦Óòãraw socket½Ø°ü·¨
ÔʼÌ×½Ó×ÖÒ²Êdz£ÓõĽذü·½·¨£¬¿Éϧ¹¦ÄÜÓÐÏÞ¡£Äں˴¦ÀíµÄËùÓÐÆäËüÀàÐ͵ÄÊý¾Ý°ü¶¼»á´«Ò»¸ö¿½±´¸øÆ¥ÅäµÄÔʼÌ×½Ó×Ö£¬µ«ÊÇ·½±ã¼àÌýµÄͬʱÊÇÐÞ¸ÄÉϵÄÎÞÁ¦£¬ÒòΪµÃµ½µÄÊý¾Ý½ö½öÊǸö¿½±´¡£¶øÔʼÌ
Ïà¹ØÎĵµ£º
2009 Äê 4 ÔÂ 23 ÈÕ
±¾ÎÄÖÐÎÒÃÇÕë¶Ô Linux É϶àÏ̱߳à³ÌµÄÖ÷ÒªÌØÐÔ×ܽá³ö 5 Ìõ¾Ñ飬ÓÃÒÔ¸ÄÉÆ Linux ¶àÏ̱߳à³ÌµÄÏ°¹ßºÍ±ÜÃâÆäÖеĿª·¢ÏÝÚå¡£ÔÚ±¾ÎÄÖУ¬ÎÒÃÇ´©²åһЩ Windows µÄ±à³ÌÓÃÀýÓÃÒÔ¶Ô±È Linux ÌØÐÔ£¬ÒÔ¼ÓÉî¶ÁÕßÓ¡Ïó¡£
±³¾°
Linux ƽ̨ÉϵĶàÏ̳߳ÌÐò¿ª·¢Ïà¶ÔÓ¦ÆäËûƽ̨£¨±ÈÈç Windows£©µÄ¶àÏß³Ì API ÓÐһЩϸ΢ ......
Ö¸ÁîÃû³Æ : chmod
ʹÓÃȨÏÞ : ËùÓÐʹÓÃÕß
ʹÓ÷½Ê½ : chmod [-cfvR] [--help] [--version] mode file...
˵Ã÷ : Linux/Unix µÄµµ°¸µ÷ÓÃȨÏÞ·ÖΪÈý¼¶ : µµ°¸ÓµÓÐÕß¡¢Èº×é¡¢ÆäËû¡£ÀûÓà chmod ¿ÉÒÔ½åÒÔ¿ØÖƵµ°¸ÈçºÎ±»ËûÈËËùµ÷Óá£
²ÎÊý :
mode : ȨÏÞÉ趨×Ö´®£¬¸ñʽÈçÏ : [ugoa...][[+-=][rwxX] ......
so_test.h£º
#include
#include
void test_a();
void test_b();
void test_c();
test_a.c£º
#include "so_test.h"
void test_a()
{
printf("this is in test_a...\n");
}
test_b.c£º
#include "so_test.h"
void test_b()
{
printf("this is in test_b...\n");
......
<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm }
A:link { so-language: zxx }
-->
´ó¼ÒÖªµÀ£¬
MeeGo
×ÀÃæµÄ×î´óÌصãÊÇʹÓÃ×ÔÓÉ£¨
free
use
£©£¬²»ÂÛÄãÔÚʲôµØ·½£¨Ê²Ã´¹ú¼Ò£©£¬Ò²²»ÂÛÄãÏëÓÃËü¸ÉʲôÊÂÇé¡£ÄÇô£¬
MeeGo
ÊDz»ÊÇÀ¬»ø´úÂëÄØ£¿µ±È»²»ÊÇ¡£ ......
µ¥Óû§Ä£Ê½½øÈ룺
½øÈëÆô¶¯»ÃæÖ®ºó£¬ÇÃÈë“e”£¬¹â±êÒƶ¯µ½kernel ...ÄÇÒ»ÐУ¬ÔÙÇÃÈë“e”£¬ÔÚkernel Ò»ÐеÄ×îºó¼ÓÉÏ¿Õ¸ñsingle£¬»Ø³µ
ÇÃÈë“b”£¬Æô¶¯ÏµÍ³£¬¼´½øÈëµ¥Óû§Ä£Ê½
²é¿´ÃüÁîÆô¶¯Â·¾¶£º
vi .bashrc
²é¿´»·¾³±äÁ¿£º
env
¸Ä±äĿ¼ȨÏÞ£º
chmod -R +777 Ŀ¼
²é¿´×Ô ......