26.12.2013 Views

lwIP - A Minimal TCP/IP implementation - Wikia

lwIP - A Minimal TCP/IP implementation - Wikia

lwIP - A Minimal TCP/IP implementation - Wikia

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

15 API reference 21<br />

15.1 Data types ........................................ 21<br />

15.1.1 Netbufs ...................................... 21<br />

15.2 Buffer functions ...................................... 21<br />

15.2.1 netbuf new() ................................... 21<br />

15.2.2 netbuf delete() .................................. 21<br />

15.2.3 netbuf alloc() ................................... 22<br />

15.2.4 netbuf free() ................................... 22<br />

15.2.5 netbuf ref() .................................... 22<br />

15.2.6 netbuf len() .................................... 23<br />

15.2.7 netbuf data() ................................... 23<br />

15.2.8 netbuf next() ................................... 23<br />

15.2.9 netbuf first() ................................... 24<br />

15.2.10 netbuf copy() ................................... 24<br />

15.2.11 netbuf chain() .................................. 24<br />

15.2.12 netbuf fromaddr() ................................ 24<br />

15.2.13 netbuf fromport() ................................ 25<br />

16 Network connection functions 25<br />

16.0.14 netconn new() .................................. 25<br />

16.0.15 netconn delete() ................................. 25<br />

16.0.16 netconn type() .................................. 25<br />

16.0.17 netconn peer() .................................. 25<br />

16.0.18 netconn addr() .................................. 26<br />

16.0.19 netconn bind() .................................. 26<br />

16.0.20 netconn connect() ................................ 26<br />

16.0.21 netconn listen() .................................. 26<br />

16.0.22 netconn accept() ................................. 26<br />

16.0.23 netconn recv() .................................. 27<br />

16.0.24 netconn write() .................................. 28<br />

16.0.25 netconn send() .................................. 29<br />

16.0.26 netconn close() .................................. 30<br />

17 BSD socket library 30<br />

17.1 The representation of a socket .............................. 30<br />

17.2 Allocating a socket .................................... 30<br />

17.2.1 The socket() call ................................ 30<br />

17.3 Connection setup ..................................... 31<br />

17.3.1 The bind() call ................................. 31<br />

17.3.2 The connect() call ............................... 31<br />

17.3.3 The listen() call ................................ 32<br />

17.3.4 The accept() call ................................ 32<br />

17.4 Sending and receiving data ............................... 33<br />

17.4.1 The send() call ................................. 33<br />

17.4.2 The sendto() and sendmsg() calls ....................... 34<br />

17.4.3 The write() call ................................. 34<br />

17.4.4 The recv() and read() calls .......................... 35<br />

17.4.5 The recvfrom() and recvmsg() calls ..................... 36<br />

18 Code examples 36<br />

18.1 Using the API ...................................... 36<br />

18.2 Directly interfacing the stack .............................. 39<br />

Bibliography 41

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!