[Gambas-devel] socket

Daniel Campos daniel.campos at ...103...
Sat May 14 10:59:46 CEST 2005


Hi Frank:


Ah! this is not was you told me in the previous message :-))). You're 
not trying
to work with datagrams, but with raw network data, that is, you're trying
to write a kind of "sniffer" in Gambas, reading low level data and 
determining
what of these frames are ax25 frames. You can not use the gb.net component
for that, you should use "api calls" instead. You should define all the 
extern
functions and constants you need (socket, etc...), and probably you'll 
need to
work with the program as root too, as these kind of operations are not 
allowed
by the Linux kernel for normal users...

Regards,

D. Campos

Frank Berg escribió:

> hi daniel,
>
> i was try in the last month to listen (monitoring) the ax25 network 
> frames,
> in the listen.c example i must use the socket command
>
> int fd
> fd=socket(AF_PACKET, SOCK_PACKET,htons(ETH_P_ALL))
>
> in the example after this the command recvfrom(fd,...) is used to poll 
> the buffer
>
> you was write me back i must use the udpSocket class, but there is no 
> ip or port i can open and bind the class.
>
> please tell me, how this socket line / polling line is to make in 
> gambas. and my next question is: i think it is not very good to use 
> polling mode. but what can i do else
>
> frank
>
>
> ----- Original Message ----- From: "Daniel Campos" 
> <daniel.campos at ...103...>
> To: <gambas-devel at lists.sourceforge.net>
> Sent: Saturday, December 18, 2004 10:44 AM
> Subject: Re: [Gambas-devel] socket
>
>
>> If you want to use datagrams, you have to use the UdpSocket class.
>>
>> Regards,
>>
>> D. Campos
>>
>>
>>
>>
>> -------------------------------------------------------
>> SF email is sponsored by - The IT Product Guide
>> Read honest & candid reviews on hundreds of IT Products from real users.
>> Discover which products truly live up to the hype. Start reading now.
>> http://productguide.itmanagersjournal.com/
>> _______________________________________________
>> Gambas-devel mailing list
>> Gambas-devel at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-devel
>>
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by Oracle Space Sweepstakes
> Want to be the first software developer in space?
> Enter now for the Oracle Space Sweepstakes!
> http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click
> _______________________________________________
> Gambas-devel mailing list
> Gambas-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-devel
>
>





More information about the Devel mailing list