Cam pe la 11/12/2003 09:46 AM, Cornel Grecu scrise:

>On Tue, 11 Nov 2003, andy.rlug wrote:
>
>  
>
>>Hello rlug,
>>
>>  cum fac limitare la dc++ si kazza?
>>    
>>
>
>
>http://freshmeat.net/projects/ipt_p2p/?topic_id=151
>  
>

Din curiozitate, m-am uitat pe surse ca sa vad cum face. Face match pe 
stringuri. In FAQ scrie:

7. How stable and how fast is it ?

  All I can say is that ipt_p2p is now running 24/7 on a 15mbits
  university internet backbone to shape p2p network traffic with
  almost zero performance impact. I also know of other people using
  it in production enviorments.

Cum ar merge pe un gigabit? Il aveti careva pus pe interfete cu trafic mare?

In main:

    if (match_http(data, end)) return 1;
    if (match_edonkey(data, end)) return 1;
    if (match_dc(data, end)) return 1;
    if (match_bittorrent(data, end)) return 1;

Si ca exemplu, in match_bittorrent.c:

const unsigned char bittorrent_string[] = "\x13"
                            "BitTorrent protocol"
                            "\x0\x0\x0\x0\x0\x0\x0\x0";

int
match_bittorrent( const unsigned char *data,
                const unsigned char *end)
{
    if (end - data < SIZE_MIN || end - data > SIZE_MAX) return 0;

    if(memcmp(data, bittorrent_string, sizeof(bittorrent_string) - 1) == 
0) return 1;
    return 0;
}



>>--
>>Best regards,
>> andy.rlug                          mailto:[EMAIL PROTECTED]
>>
>>
>>---
>>Detalii despre listele noastre de mail: http://www.lug.ro/
>>
>>
>>
>>    
>>
>
>
>--- 
>Detalii despre listele noastre de mail: http://www.lug.ro/
>
>  
>


-- 
Ce nu te omoara ti-o intareste.



--- 
Detalii despre listele noastre de mail: http://www.lug.ro/


Raspunde prin e-mail lui