On Fri, 16 May 2008, Bob McConnell wrote:
From: Wojciech Puchar
if (buffer = NULL) {
if (buffer == NULL) {
anyway not using malloc is good habit :) but it should work anyway.
try
The test after the malloc was the problem. I have been working in a
:)
From: Wojciech Puchar
>> if (buffer = NULL) {
>>
>> if (buffer == NULL) {
>>
> anyway not using malloc is good habit :) but it should work anyway.
> try
The test after the malloc was the problem. I have been working in a
poorly designed scripting language for several months where the
"Bob McConnell" <[EMAIL PROTECTED]> writes:
> From: Bob McConnell
>>From: Wojciech Puchar
The basic setup sequence is:
ifconfig tap0 create
ifconfig tap0 inet 10.3.4.254/24
route -v add 10.3.4.0/24 10.3.4.254
>>>
>>> ifconfig tap0 up
>>>
>>> ?
>>>
>>
>> 'ifconfig'
unsigned char * buffer = (unsigned char*)malloc(1514);
is stdlib.h included (i'm asking for sure)?
if (buffer = NULL) {
if (buffer == NULL) {
fprintf (stderr, "No memory available.\n");
close (tapFD);
exit(3);
}
When I replace the malloc with an automatic array, the
er
On Thu, 15 May 2008 14:49:26 -0400
"Bob McConnell" <[EMAIL PROTECTED]> wrote:
> >>> My code so far:
> >>>
> >>> - tear along dotted line -
> >>> tapFD = open ("/dev/tap0", O_RDWR);
> >>> if (tapFD < 0) {
> >>>fprintf (stderr, "Failed to open /dev/tap0: %d.\n",
From: Bob McConnell
>From: Wojciech Puchar
>>>
>>> The basic setup sequence is:
>>>
>>> ifconfig tap0 create
>>> ifconfig tap0 inet 10.3.4.254/24
>>> route -v add 10.3.4.0/24 10.3.4.254
>>
>> ifconfig tap0 up
>>
>> ?
>>
>
> 'ifconfig' already showed the interface flag UP. Adding this command
>
From: Wojciech Puchar
>>
>> The basic setup sequence is:
>>
>> ifconfig tap0 create
>> ifconfig tap0 inet 10.3.4.254/24
>> route -v add 10.3.4.0/24 10.3.4.254
>
> ifconfig tap0 up
>
> ?
>
'ifconfig' already showed the interface flag UP. Adding this command
to the sequence has no effect on it. I
The basic setup sequence is:
ifconfig tap0 create
ifconfig tap0 inet 10.3.4.254/24
route -v add 10.3.4.0/24 10.3.4.254
ifconfig tap0 up
?
At this point, I can ping that address and my application can open
either /dev/net/tap0 or /dev/tap0. But when I try to read() from those
devices, I