According to Google, it's just some extended API crap piled upon C code. Thus, simply use fopen and fclose like you'd normally use in C.
Doubt me? Look at their example code:
Code:
char myframe[ MAX_MESSAGE_SIZE + MY_OVERHEAD ];
int link, length;
length = sizeof(myframe);
result = CNET_read_physical(&link, myframe, &length);
Red is a standard C operator, blue is their function calls. More examples, right from the website itself:
Code:
static void write_to_ethernet(CnetNicaddr dest, int link, char *buf, int len)
{
ETHERPACKET packet;
short int twobytes;
memcpy(packet.dest, dest, sizeof(CnetNicaddr));
memcpy(packet.src, linkinfo[link].nicaddr, sizeof(CnetNicaddr));
twobytes = len; /* type carries the data's true length */
memcpy(packet.type, &twobytes, 2);
memcpy(packet.data, buf, len);
len += LEN_ETHERHEADER;
if(len < ETH_MINPACKET) /* pad short packets to minimum length */
len = ETH_MINPACKET;
CHECK(CNET_write_physical(link, (char *)&packet, &len));
......
}
I suspect if you'd have actually taken the time to read your documentation on Cnet, that you would have found the answers youself, rather than making an ass of yourself here.
Yes, you did make an ass of yourself. You don't show up here and give vague information and expect everyone to immediately know some obscure API without even hinting at what it is.
Furthermore, had you actually read this first, like it tells you to, you'd have seen bullet point #2, which is: Don't expect everyone to do your work for you. You need to help people help you.
It is your duity to provide as much information as possible for people to assist you.
Consider yourself rebuked.
Quzah.