Devuan fork of gpsd
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

42 lines
1.2 KiB

  1. <sect1 id="netlib.c"><title><filename>netlib.c</filename></title>
  2. <informaltable frame='all' pgwide='1'>
  3. <tgroup cols='2'>
  4. <colspec colname='c1'></colspec>
  5. <colspec colname='c2'></colspec>
  6. <spanspec spanname='s1' namest='c1' nameend='c2'></spanspec>
  7. <!-- Not documented: netlib_errstr() -->
  8. <thead>
  9. <row>
  10. <entry>Functions:-</entry><entry>This provides socket connectivity.</entry>
  11. </row>
  12. </thead>
  13. <tfoot>
  14. <row>
  15. <entry spanname='s1' align='left'>Notes based on the code as of Mon Apr 5 21:38:06 2010 -0400.</entry>
  16. </row>
  17. </tfoot>
  18. <tbody>
  19. <row>
  20. <entry><function>int netlib_connectsock(const char *host, const char *service, const char *protocol)</function></entry>
  21. <entry><para>This attempts to connect the to nominated service on
  22. the nominated host using the nominated protocol. On success, the
  23. return value is the socket number. On error, an appropriate system
  24. defined error code is returned.</para></entry>
  25. </row>
  26. <row>
  27. <entry><function>char *sock2ip(int fd)</function></entry>
  28. <entry><para>This makes a call to <function>getpeername</function>
  29. using the supplied fd. On success, the returned string is the ip
  30. address in dotted notation. On error, "&lt;unknown&gt;" is
  31. returned.</para></entry>
  32. </row>
  33. </tbody>
  34. </tgroup>
  35. </informaltable>
  36. </sect1>