You just need to put it in a file (ie netdbc.c) and compile it :)
gcc netdvb.c -o netdvb
Alex
Cris wrote:
>
> Hi,
> Newbie question i think..
> Where do i put this code ??
>
> Cris
> ----- Original Message -----
> From: "Alex W" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Monday, August 13, 2001 10:26
> Subject: [linux-dvb] Re: Installation perfect, dvb0 nowhere!
>
> > Hi!
> >
> > If you want to use your DVB net interface, this small piece of code can
> > help you ;)
> >
> >
> > #include <fcntl.h>
> > #include <sys/ioctl.h>
> > #include "ost/include/ost/net.h"
> >
> > int main(int argc, char **argv)
> > {
> > char devnamen[80];
> > int dev, fdn;
> > struct dvb_net_if netif;
> >
> > dev = 0;
> > netif.pid = 0;
> > netif.if_num = 0;
> >
> > sprintf(devnamen,"/dev/ost/net%d",dev);
> > printf("Open %s\n",devnamen);
> >
> > if((fdn = open(devnamen,O_RDWR|O_NONBLOCK)) < 0){
> > perror("DVB NET DEVICE: ");
> > return;
> > }
> >
> > ioctl( fdn,NET_ADD_IF,&netif);
> > }
> >
> >
> > ��`�.��.���`�.��.���`�- Alex -���`�.��.���`�.��.���`
> >
> > Alexandre Wodarczyk
> > ICQ# : 71328734
> > eMail : [EMAIL PROTECTED]
> > __ _
> > / / (_)__ __ ____ __ * Powerful * Flexible * Compatible *
> > Reliable *
> > / /__/ / _ \/ // /\ \/ / *Well Supported * Thousands of New Users
> > Every Day*
> > /____/_/_//_/\_,_/ /_/\_\ The Cost Effective Choice - Linux Means
> > Business!
> >
> >
> > --
> > Info:
> > To unsubscribe send a mail to [EMAIL PROTECTED] with "unsubscribe
> linux-dvb" as subject.
--
��`�.��.���`�.��.���`�- Alex -���`�.��.���`�.��.���`
Alexandre Wodarczyk
ICQ# : 71328734
eMail : [EMAIL PROTECTED]
__ _
/ / (_)__ __ ____ __ * Powerful * Flexible * Compatible *
/ /__/ / _ \/ // /\ \/ / * Thousands of New Users Every Day *
/____/_/_//_/\_,_/ /_/\_\ * Well Supported * Reliable *
--
Info:
To unsubscribe send a mail to [EMAIL PROTECTED] with "unsubscribe linux-dvb" as
subject.