File: net.h

package info (click to toggle)
syslinux 3%3A6.03%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 41,220 kB
  • sloc: ansic: 358,747; asm: 9,606; pascal: 4,809; perl: 3,894; makefile: 2,488; sh: 324; python: 266; xml: 39
file content (42 lines) | stat: -rw-r--r-- 1,206 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#ifndef _NET_H
#define _NET_H

#include <stdint.h>
#include <stdbool.h>
#include <stddef.h>

void net_core_init(void);
void net_parse_dhcp(void);

struct pxe_pvt_inode;

int core_udp_open(struct pxe_pvt_inode *socket);
void core_udp_close(struct pxe_pvt_inode *socket);

void core_udp_connect(struct pxe_pvt_inode *socket,
		      uint32_t ip, uint16_t port);
void core_udp_disconnect(struct pxe_pvt_inode *socket);

int core_udp_recv(struct pxe_pvt_inode *socket, void *buf, uint16_t *buf_len,
		  uint32_t *src_ip, uint16_t *src_port);

void core_udp_send(struct pxe_pvt_inode *socket,
		   const void *data, size_t len);

void core_udp_sendto(struct pxe_pvt_inode *socket, const void *data, size_t len,
		     uint32_t ip, uint16_t port);

void probe_undi(void);
void pxe_init_isr(void);

struct inode;

int core_tcp_open(struct pxe_pvt_inode *socket);
int core_tcp_connect(struct pxe_pvt_inode *socket, uint32_t ip, uint16_t port);
bool core_tcp_is_connected(struct pxe_pvt_inode *socket);
int core_tcp_write(struct pxe_pvt_inode *socket, const void *data,
		   size_t len, bool copy);
void core_tcp_close_file(struct inode *inode);
void core_tcp_fill_buffer(struct inode *inode);

#endif /* _NET_H */