File: socklib.h

package info (click to toggle)
streamripper 1.61.27-1%2Betch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 1,440 kB
  • ctags: 1,073
  • sloc: ansic: 9,559; sh: 8,878; makefile: 353; perl: 34
file content (20 lines) | stat: -rw-r--r-- 695 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#ifndef __socklib_h__
#define __socklib_h__

#include "srtypes.h"

#ifndef INADDR_NONE
#define INADDR_NONE (-1)
#endif

error_code socklib_init ();
error_code socklib_open (HSOCKET *socket_handle, char *host, int port, char *if_name);
void socklib_close (HSOCKET *socket_handle);
void socklib_cleanup ();
error_code socklib_read_header (HSOCKET *socket_handle, char *buffer, int size, 
				int (*recvall)(HSOCKET *sock, char* buffer, int size, int timeout));
int socklib_recvall (HSOCKET *socket_handle, char* buffer, int size, int timeout);
int socklib_sendall (HSOCKET *socket_handle, char* buffer, int size);
error_code read_interface (char *if_name, uint32_t *addr);

#endif	//__socklib_h__