home *** CD-ROM | disk | FTP | other *** search
- TABLE OF CONTENTS
-
- miami.library/--callback hook mechanism for packet monitoring--
- miami.library/--general information--
- miami.library/--information about T/TCP--
- miami.library/freeaddrinfo
- miami.library/gai_strerror
- miami.library/getaddrinfo
- miami.library/gethostbyname2
- miami.library/getnameinfo
- miami.library/if_freenameindex
- miami.library/if_indextoname
- miami.library/if_nameindex
- miami.library/if_nametoindex
- miami.library/inet_aton
- miami.library/inet_ntop
- miami.library/inet_pton
- miami.library/MiamiCloseSSL
- miami.library/MiamiDisallowDNS
- miami.library/MiamiGetFdCallback
- miami.library/MiamiGetHardwareLen
- miami.library/MiamiGetPid
- miami.library/MiamiGetResOptions
- miami.library/MiamiIsOnline
- miami.library/MiamiOnOffline
- miami.library/MiamiOpenSSL
- miami.library/MiamiPFAddHook
- miami.library/MiamiPFRemoveHook
- miami.library/MiamiSetFdCallback
- miami.library/MiamiSetResOptions
- miami.library/MiamiSetSocksConn
- miami.library/MiamiSupportedCPUs
- miami.library/MiamiSupportsIPV6
- miami.library/MiamiSysCtl
- miami.library/sockatmark
- miami.library/--callback hook mechanism for packet monitoring--
-
- Miami 1.9.3 and higher support a simple packet monitoring mechanism.
-
- Miami allows you to add a callback hook that gets called whenever
- Miami is about to send or receive a packet. This allows you to
- monitor any traffic between Miami and your network interface, to keep
- statistics, and to detect attempts of unauthorized access.
-
- The two functions MiamiPFAddHook() and MiamiPFRemoveHook() are used
- to install and remove a hook, respectively.
-
- miami.library/--general information-- miami.library/--general information--
-
- miami.library contains some additional functions to augment
- the API in bsdsocket.library. The current version of miami.library
- is 12 (for Miami 2.93a).
-
- miami.library/--information about T/TCP--
-
- Miami 1.8.1 and higher support T/TCP (TCP for transactions).
-
- To use T/TCP in your programs you first need to check if Miami
- version 1.8.1 is running (by checking if miami.library V3 or higher
- exists). Then use sendto() calls instead of connect() to establish a
- connection.
-
- For more information please have a look at the example 'ttcptest.c'.
-
- miami.library/freeaddrinfo miami.library/freeaddrinfo
-
- NAME
- freeaddrinfo -- Free an addrinfo structure obtained earlier (V11)
-
- SYNOPSIS
- freeaddrinfo( addrinfo );
- A0
-
- void freeaddrinfo( struct addrinfo *addrinfo );
-
- FUNCTION
- This function frees an address info structure (actually a linked list
- of addrinfo structures) returned earlier by getaddrinfo().
-
- INPUTS
- addrinfo - address info structure
-
- miami.library/gai_strerror miami.library/gai_strerror
-
- NAME
- gai_strerror -- Return the error text corresponding to an addressinfo
- error code (V11)
-
- SYNOPSIS
- str = gai_strerror( error );
- D0 D0
-
- char *gai_strerror( long error );
-
- FUNCTION
- This function returns the error string corresponding to an error
- associated with getaddrinfo() or getnameinfo(), i.e. one of the
- EAI_... codes.
-
- The error string returned is located in static storage and does not
- need to be freed.
-
- INPUTS
- error - error code
-
- RESULT
- str (D0) - error string
-
- miami.library/getaddrinfo miami.library/getaddrinfo
-
- NAME
- getaddrinfo -- Look up IP addresses for a host name and service (V11)
-
- SYNOPSIS
- error = getaddrinfo( hostname, servicename, hintsp, result );
- D0 A0 A1 A2 A3
-
- long getaddrinfo( char *hostname, char *servicename, struct addrinfo
- *hintsp, struct addrinfo **result );
-
- FUNCTION
- This function performs a combined host name and service name lookup.
- The result is stored in a linked list of "struct addrinfo". The
- pointer to the first structure in the list is stored in (*result).
- After use the linked list needs to be freed by calling freeaddrinfo()
- with the first element.
-
- If hintsp is not a NULL pointer then it needs to point to a struct
- addrinfo that contains hints on how the returned result will be used
- by the caller, i.e. what kind of result the caller is interested in.
- The caller can set ai_flags, ai_family, ai_socktype and ai_protocol.
-
- This function can be used with IPv4 and IPv6 addresses.
-
- INPUTS
- hostname - host name
-
- servicename - service name
-
- hintsp - address hints
-
- result - pointer to return pointer
-
- RESULT
- error (D0) - error code
-
- miami.library/gethostbyname2 miami.library/gethostbyname2
-
- NAME
- gethostbyname2 -- Look up IP addresses for a host name (V11)
-
- SYNOPSIS
- hostentry = gethostbyname2( name, family );
- D0 A0 D0
-
- struct hostent *gethostbyname2( char *name, long family );
-
- FUNCTION
- This function is identical to gethostbyname(), except that it accepts
- an additional "address family" parameter, that allows the application
- to indicate what kind of address records should be looked up through
- DNS. If AF_INET is specified then IPv4 addresses (A records) are
- used. If AF_INET6 is specified then IPv6 addresses (AAAA records)
- are used.
-
- Please note that the format in which gethostbyname2() returns IP
- addresses also depends on the setting of the RES_USE_INET6 resolver
- option: if that option is set then gethostbyname2() always returns
- IPv6 addresses. Any IPv4 addresses found (A records) are
- automatically converted into the corresponding IPv6 addresses
- ("IPv4-mapped IPv6 addresses")
-
- INPUTS
- name - host name
-
- family - address family
-
- RESULT
- hostentry (D0) - host entry
-
- miami.library/getnameinfo miami.library/getnameinfo
-
- NAME
- getnameinfo -- Look up host name and service name (V11)
-
- SYNOPSIS
- error = getnameinfo( sockaddr, addrlen, hostname, hostlen,
- D0 A0 D0 A1 D1
- servicename, servicelen, flags );
- A2 D2 D3
-
- long getnameinfo( struct sockaddr *sockaddr, long addrlen, char
- *hostname, long hostlen, char *servicename, long servicelen, long
- flags );
-
- FUNCTION
- This function looks up a host name and a service name corresponding
- to the IP address and port number in the specified sockaddr
- structure, and stores both names in the buffers provided by the
- caller.
-
- flags can be a combination of the NI_... flags specified in
- <netdb.h>, to control the behavior of getnameinfo().
-
- This function can be used with IPv4 and IPv6 addresses.
-
- INPUTS
- sockaddr - IP address and port
-
- addrlen - length of sockaddr
-
- hostname - buffer for host name
-
- hostlen - length of host name buffer
-
- servicename - buffer for service name
-
- servicelen - length of service name buffer
-
- flags - flags
-
- RESULT
- error (D0) - error code
-
- miami.library/if_freenameindex miami.library/if_freenameindex
-
- NAME
- if_freenameindex -- Frees an array of interface index/name pairs
- (V11)
-
- SYNOPSIS
- if_freenameindex( nameindex );
- D0
-
- void if_freenameindex( struct if_nameindex *nameindex );
-
- FUNCTION
- This function frees an array of interface index/name pairs which was
- previously obtained by calling if_nameindex().
-
- INPUTS
- nameindex - array of index/name pairs
-
- miami.library/if_indextoname miami.library/if_indextoname
-
- NAME
- if_indextoname -- Return the interface name corresponding to an
- interface index (V11)
-
- SYNOPSIS
- name = if_indextoname( index, name );
- D0 D0 A0
-
- char *if_indextoname( long index, char *name );
-
- FUNCTION
- This function stores the name of the interface corresponding to the
- specified interface index in the specified buffer. That buffer must
- be at least IFNAMSIZ bytes in size.
-
- Upon success a pointer to the interface buffer is returned. If an
- error occurs (i.e. if the interface index is invalid) then NULL is
- returned.
-
- INPUTS
- index - interface index
-
- name - buffer for interface name
-
- RESULT
- name (D0) - interface name
-
- miami.library/if_nameindex miami.library/if_nameindex
-
- NAME
- if_nameindex -- Return an array of interface index/name pairs (V11)
-
- SYNOPSIS
- nameindex = if_nameindex();
- D0
-
- struct if_nameindex *if_nameindex (void);
-
- FUNCTION
- This function returns an array of interface index/name pairs,
- describing all interfaces in the system. The array is terminated by
- a {0,NULL} entry. After use the array has to be freed by calling
- if_freenameindex().
-
- RESULT
- nameindex (D0) - array of index/name pairs
-
- miami.library/if_nametoindex miami.library/if_nametoindex
-
- NAME
- if_nametoindex -- Return the interface index corresponding to an
- interface name (V11)
-
- SYNOPSIS
- index = if_nametoindex( name );
- D0 A0
-
- long if_nametoindex( char *name );
-
- FUNCTION
- This function returns the interface index (an integer >= 1)
- corresponding to the specified interface name. If the specified
- interface name is invalid then 0 is returned.
-
- INPUTS
- name - interface name
-
- RESULT
- index (D0) - interface index
-
- miami.library/inet_aton miami.library/inet_aton
-
- NAME
- inet_aton -- Convert an IPv4 address from ASCII to numeric form (V11)
-
- SYNOPSIS
- success = inet_aton( strptr, addrptr );
- D0 A0 A1
-
- int inet_aton( char *strptr, void *addrptr );
-
- FUNCTION
- This function is similar to inet_addr() in that it converts the ASCII
- representation of an IPv4 address into the corresponding binary form.
- However inet_addr() has one design flaw that is corrected by
- inet_aton(): inet_addr() returns -1 if an error has occured, which is
- identical to the binary representation of 255.255.255.255. This
- makes it impossible to parse 255.255.255.255 with inet_addr(),
- because the return result would be indistinguishible from an error.
- inet_aton() keeps the output buffer and return code separately,
- making inet_aton() preferable over inet_addr() for new software.
-
- If no error occurs then inet_aton() stores the binary form of the
- specified IP address in the output buffer, and returns 1. Otherwise
- 0 is returned.
-
- Please note that inet_aton() only supports IPv4 addresses. For IPv4-
- and IPv6-compatible address conversion please use inet_pton().
-
- INPUTS
- strptr - ASCII string
-
- addrptr - output buffer
-
- RESULT
- success (D0) - success
-
- miami.library/inet_ntop miami.library/inet_ntop
-
- NAME
- inet_ntop -- Convert an IP address from numeric to ASCII form (V11)
-
- SYNOPSIS
- strptr = inet_ntop( family, addrptr, strptr, len );
- D0 D0 A0 A1 D1
-
- char *inet_ntop( long family, void *addrptr, char *strptr, long len
- );
-
- FUNCTION
- This function is similar to inet_ntoa() in that it converts the
- binary representation of an IP address into a suitable ASCII
- representation. However inet_ntop() not only supports IPv4
- addresses, but also IPv6 addresses (if the protocol stack supports
- IPv6), making inet_ntop() preferable over inet_ntoa() for new
- software.
-
- The parameter "family" can be AF_INET or AF_INET6, indicating an IPv4
- or IPv6 address.
-
- If no error occurs then inet_ntop() stores the ASCII representation
- of the specified IP address in the output buffer, and returns the
- address of the output buffer. Otherwise NULL is returned.
-
- INPUTS
- family - address family
-
- addrptr - IP address
-
- strptr - output buffer
-
- len - length of output buffer
-
- RESULT
- strptr (D0) - return buffer
-
- miami.library/inet_pton miami.library/inet_pton
-
- NAME
- inet_pton -- Convert an IP address from ASCII to numeric form (V11)
-
- SYNOPSIS
- success = inet_pton( family, strptr, addrptr );
- D0 D0 A0 A1
-
- int inet_pton( long family, char *strptr, void *addrptr );
-
- FUNCTION
- This function is similar to inet_aton() and inet_addr() in that it
- converts the ASCII representation of an IP address into the
- corresponding binary form. However inet_pton() not only supports
- IPv4 addresses, but also IPv6 addresses (if the protocol stack
- supports IPv6), making inet_pton() preferable over inet_aton() or
- inet_addr() for new software.
-
- The parameter "family" can be AF_INET or AF_INET6, indicating an IPv4
- or IPv6 address.
-
- If no error occurs then inet_pton() stores the binary form of the
- specified IP address in the output buffer, and returns 1. Otherwise
- 0 is returned.
-
- INPUTS
- family - address family
-
- strptr - ASCII string
-
- addrptr - output buffer
-
- RESULT
- success (D0) - success
-
- miami.library/MiamiCloseSSL miami.library/MiamiCloseSSL
-
- NAME
- MiamiCloseSSL -- closes the SSL library (V7)
-
- SYNOPSIS
- MiamiCloseSSL();
-
-
- void MiamiCloseSSL (void);
-
- FUNCTION
- Closes the SSL library which was previously opened by a call to
- MiamiOpenSSL. You MAY NOT call CloseLibrary directly to close the
- SSL library.
-
- miami.library/MiamiDisallowDNS miami.library/MiamiDisallowDNS
-
- NAME
- MiamiDisallowDNS -- disallow DNS lookups for gethostbyaddr. (V3)
-
- SYNOPSIS
- MiamiDisallowDNS( value );
- D0
-
- void MiamiDisallowDNS( long value );
-
- FUNCTION
- Prevents Miami from performing any external DNS lookups (i.e. from
- contacting DNS servers) for all subsequent calls to gethostbyaddr().
- A 'value' of TRUE disallows DNS lookups, i.e. prevents Miami from
- doing DNS lookups. A 'value' of FALSE reenables DNS lookups again.
-
- Calls to MiamiDisallowDNS do NOT nest, i.e. if you call the function
- multiple times with a 'value' of TRUE, then a single call with a
- 'value' of FALSE will reenable DNS lookups.
-
- While DNS lookups are deactivated gethostbyaddr() still returns
- non-zero values for IP addresses which are either in the 'hosts'
- database, or which are in Miami's DNS cache.
-
- MiamiDisallowDNS is primarily useful for diagnostic tools that know
- an IP address and need to report this address to the user in a more
- user-friendly way (i.e. including the host name), but which would
- rather report the IP address by itself than wait for a DNS lookup to
- complete. One such example is 'MiamiNetStat' with the '-N' flag set.
-
- INPUTS
- value - boolean: disallow DNS lookups
-
- EXAMPLE
- MiamiDisallowDNS(TRUE);
-
- miami.library/MiamiGetFdCallback miami.library/MiamiGetFdCallback
-
- NAME
- MiamiGetFdCallback -- Return the current FD callback (V12)
-
- SYNOPSIS
- cputype = MiamiGetFdCallback( cbptr );
- D0 A0
-
- long MiamiGetFdCallback( void **cbptr );
-
- FUNCTION
- This function returns a pointer to the current FD callback function
- in (*cbptr), and the CPU type of that callback (one of MIAMICPU_...)
- as a return value of the function call. If no callback is currently
- set then (*cbptr) is set to NULL and the CPU type 0 is returned.
-
- This function is a replacement for the deprecated SocketBase option
- SBTM_GETVAL(SBTC_FDCALLBACK), which does not handle mixed-CPU setups.
-
- INPUTS
- cbptr - returned callback ptr
-
- RESULT
- cputype (D0) - cpu type of callback
-
- miami.library/MiamiGetHardwareLen miami.library/MiamiGetHardwareLen
-
- NAME
- MiamiGetHardwareLen -- return the hardware address length. (V5)
-
- SYNOPSIS
- len = MiamiGetHardwareLen( name );
- D0 A0
-
- int MiamiGetHardwareLen( char *name );
-
- FUNCTION
- This function returns the length of the hardware address (Ethernet
- address, Arcnet address etc.) for the specified interface in bytes.
-
- INPUTS
- name - interface name
-
- RESULT
- len (D0) - hardware address len
-
- miami.library/MiamiGetPid miami.library/MiamiGetPid
-
- NAME
- MiamiGetPid -- return Miami's internal process descriptor. (V5)
-
- SYNOPSIS
- pid = MiamiGetPid();
- D0
-
- void *MiamiGetPid (void);
-
- FUNCTION
- Miami associates an internal process descriptor which each opener.
- Usually you should not care about this value, but there is one case
- when it is useful to know what your process descriptor is:
-
- If your program manipulates routes directly (through routing
- sockets), then the member "rtm_pid" of "struct rt_msghdr" contains
- the process descriptor of the process that caused the routing
- message. You can compare this value against the value returned by
- MiamiGetPid() to distinguish new (aynchronous) routing messages from
- responses to your own routing messages.
-
- RESULT
- pid (D0) - process descriptor
-
- miami.library/MiamiGetResOptions miami.library/MiamiGetResOptions
-
- NAME
- MiamiGetResOptions -- Return the current resolver options (V11)
-
- SYNOPSIS
- options = MiamiGetResOptions();
- D0
-
- long MiamiGetResOptions (void);
-
- FUNCTION
- This function returns the current resolver options. CAUTION: the
- returned value may contain bits which are not listed in
- <arpa/resolv.h>, i.e. *undocumented* options. Such options are off
- limits to the caller: don't touch or change.
-
- RESULT
- options (D0) - resolver options
-
- miami.library/MiamiIsOnline miami.library/MiamiIsOnline
-
- NAME
- MiamiIsOnline -- checks whether an interface is online (V10)
-
- SYNOPSIS
- result = MiamiIsOnline( name );
- D0 A0
-
- int MiamiIsOnline( char *name );
-
- FUNCTION
- This function returns TRUE if the specified interface exists and is
- online, FALSE otherwise. Currently only interface names "lo0" and
- "mi0" are valid. This will change in Miami Deluxe though.
-
- INPUTS
- name - interface name
-
- RESULT
- result (D0) - result code
-
- miami.library/MiamiOnOffline miami.library/MiamiOnOffline
-
- NAME
- MiamiOnOffline -- checks whether an interface is online (V10)
-
- SYNOPSIS
- MiamiOnOffline( name, online );
- A0 D0
-
- void MiamiOnOffline( char *name, int online );
-
- FUNCTION
- This function tells Miami to change the online state of the specified
- interface. Passing TRUE tells Miami to try and go online, passing
- FALSE tells Miami to try and go online with the specified interface.
- Currently only interface names "lo0" and "mi0" are valid. This will
- change in Miami Deluxe though.
-
- Please note that this function is asynchronous. It returns
- immediately, and does not wait for the online/offline process to
- complete.
-
- INPUTS
- name - interface name
-
- online - online status
-
- miami.library/MiamiOpenSSL miami.library/MiamiOpenSSL
-
- NAME
- MiamiOpenSSL -- opens the SSL library (V7)
-
- SYNOPSIS
- ssllib = MiamiOpenSSL( taglist );
- D0 A0
-
- struct Library *MiamiOpenSSL( struct TagItem *taglist );
-
- FUNCTION
- This function attempts to open and initialize the SSL library for the
- current caller. A non-NULL return value indicates that the library
- was successfully opened, and that the returned library base can be
- used for MiamiSSL function calls. A NULL return value indicates that
- the SSL library could not be opened.
-
- You MAY NOT open the SSL library manually by calling OpenLibrary
- directly.
-
- To close the SSL library call the function MiamiCloseSSL, NOT
- CloseLibrary.
-
- No TagItems are currently defined, i.e. you should pass a NULL
- pointer or an empty TagList.
-
- INPUTS
- taglist - list of TagItems
-
- RESULT
- ssllib (D0) - SSL library base
-
- miami.library/MiamiPFAddHook miami.library/MiamiPFAddHook
-
- NAME
- MiamiPFAddHook -- add a packet monitoring hook. (V5)
-
- SYNOPSIS
- handle = MiamiPFAddHook( hook, interface, taglist );
- D0 A0 A1 A2
-
- APTR MiamiPFAddHook( struct Hook *hook, UBYTE *interface, struct
- TagItem *taglist );
-
- FUNCTION
- This function adds a callback hook to monitor all traffic on the
- specified interface. 'hook' has to be a pointer to an initialized
- 'struct Hook' defining the function that is called for each packet
- sent or transmitted across the specified interface. Each hook can
- only be used for a single interface at a time, but you may add more
- than one hook for each interface.
-
- 'interface' is a pointer to an ASCIZ string that contains the name of
- the interface to be monitored, currently either "mi0" or "lo0".
-
- 'taglist' is a pointer to a list of TagItems. Currently the
- following TagItems are supported:
-
- MIAMITAG_HOOKTYPE (V12): defines the type of hook. Allowed is any
- MIAMICPU_... value which was previously returned in the "callbacks"
- item of a call to MiamiSupportedCPUs(). The default is
- MIAMICPU_M68KREG.
-
- 'handle' is an opaque identifier that you need in order to remove
- your hook later. Do not make any assumptions about the meaning of
- 'handle'. 'handle' will be NULL if Miami was unable to add your
- hook.
-
- M68KREG hooks are called with the following parameters:
-
- - A0: struct Hook *: your struct Hook
-
- - A2: APTR: your callback handle
-
- - A1: struct MiamiPFBuffer *: a pointer to an initialized struct
- MiamiPFBuffer describing the packet sent or received.
-
- PPCV4 hooks are called with the same parameters as M68KREG hooks, in
- the same order as listed above, but according to PPC-V.4 calling
- conventions, i.e. you should NOT use the "__asm" keyword in the
- declaration of your callback function.
-
- INPUTS
- hook - callback hook
-
- interface - interface name to be monitored
-
- taglist - list of TagItems
-
- RESULT
- handle (D0) - callback handle
-
- NOTE
- You MAY NOT modify the contents of the buffer passed to you in the
- hook. Doing so may have unpredictable side effects including
- crashes.
-
- You MUST remove each installed hook before closing miami.library.
- This will NOT be done for you automatically.
-
- Your hook may be called on a task schedule other than your own task.
- Be prepared for a small stack, for having just a task (not a
- process), or for having an unusually low or high task priority. Also
- remember to properly set up the runtime environment required by your
- compiler (e.g. __saveds) and to switch off stack checking for the
- hook function.
-
- From your hook you may NOT call any function that might directly or
- indirectly get blocked within miami.library or bsdsocket.library,
- i.e. you may NOT call functions like WaitSelect(), send() etc. from
- your hook. It is strongly recommended NOT to do any DOS I/O or
- socket I/O at all from the hook.
-
- Packet monitoring can only be used with the registered version of
- Miami. In the unregistered version this function always returns
- NULL.
-
- miami.library/MiamiPFRemoveHook miami.library/MiamiPFRemoveHook
-
- NAME
- MiamiPFRemoveHook -- remove a packet monitoring hook. (V5)
-
- SYNOPSIS
- MiamiPFRemoveHook( handle );
- A0
-
- void MiamiPFRemoveHook( APTR handle );
-
- FUNCTION
- This function removes a callback hook which was previously added by
- calling MiamiPFAddHook.
-
- You MUST call MiamiPFRemoveHook exactly once for each hook added
- earlier before closing miami.library.
-
- INPUTS
- handle - callback handle
-
- miami.library/MiamiSetFdCallback miami.library/MiamiSetFdCallback
-
- NAME
- MiamiSetFdCallback -- Set the current FD callback (V12)
-
- SYNOPSIS
- success = MiamiSetFdCallback( cbptr, cputype );
- D0 A0 D0
-
- long MiamiSetFdCallback( void *cbptr, long cputype );
-
- FUNCTION
- This function sets the current FD callback function to "cbptr", and
- the CPU type of that callback (one of MIAMICPU_...) to "cputype".
- The function returns TRUE for success and FALSE for failure (usually
- because of an unsupported CPU type).
-
- This function is a replacement for the deprecated SocketBase option
- SBTM_SETVAL(SBTC_FDCALLBACK), which does not handle mixed-CPU setups.
-
- INPUTS
- cbptr - callback ptr
-
- cputype - cpu type of callback
-
- RESULT
- success (D0) - success indicator
-
- miami.library/MiamiSetResOptions miami.library/MiamiSetResOptions
-
- NAME
- MiamiSetResOptions -- Sets the current resolver options (V11)
-
- SYNOPSIS
- MiamiSetResOptions( options );
- D0
-
- void MiamiSetResOptions( long options );
-
- FUNCTION
- This function sets the current resolver options. CAUTION: The ONLY
- approved use of this function is as follows: get the current resolver
- options by calling MiamiGetResOptions(), change the state of some
- bits, then call MiamiSetResOptions() with the new value. NEVER
- change bits that are not documented, and NEVER call
- MiamiSetResOptions() without getting the current options first.
-
- INPUTS
- options - resolver options
-
- miami.library/MiamiSetSocksConn miami.library/MiamiSetSocksConn
-
- NAME
- MiamiSetSocksConn -- set destination address for SOCKS. (V10)
-
- SYNOPSIS
- success = MiamiSetSocksConn( sa, len );
- D0 A0 D0
-
- int MiamiSetSocksConn( struct sockaddr *sa, int len );
-
- FUNCTION
- This function sets the destination address for the next SOCKS bind()
- request. You only need to call this function if you want your
- program to work with SOCKS, and your program accepts connections from
- a machine without first establishing an outbound connection
- (connect()) to that machine, from the same bsdsocket.library opener
- process. One example application is IRC-DCC.
-
- Pass the address of the target machine (the machine you are accepting
- the connection from) and the address length. The function returns
- TRUE only if SOCKS is active and the function succeeded, FALSE in all
- other cases (e.g. if SOCKS was not used).
-
- INPUTS
- sa - target address
-
- len - address length
-
- RESULT
- success (D0) - success
-
- miami.library/MiamiSupportedCPUs miami.library/MiamiSupportedCPUs
-
- NAME
- MiamiSupportedCPUs -- Check which CPUs are supported by Miami (V12)
-
- SYNOPSIS
- MiamiSupportedCPUs( apis, callbacks, kernel );
- A0 A1 A2
-
- void MiamiSupportedCPUs( unsigned long *apis, unsigned long
- *callbacks, unsigned long *kernel );
-
- FUNCTION
- This function checks which CPUs are supported by Miami for different
- purposes. The function returns three bit masks with the following
- meanings:
-
- apis: application programming interfaces supported to access Miami.
- MIAMICPU_M68KREG is the standard 680x0 exec shared library model,
- including bsdsocket.library, miami.library and usergroup.library.
- MIAMICPU_PPCV4 is a V.4-based access mechanism for PowerPC (yet to be
- defined).
-
- callbacks: types of callbacks supported by Miami. MIAMICPU_M68KREG
- are standard 680x0 exec-style callbacks, parameters passed in
- registers. MIAMICPU_PPCV4 uses PowerPC callbacks with V.4 ABI
- paramater passing conventions. Note that for compatibility with
- Phase5's PowerUp calling conventions Miami always uses 680x0
- exec-style callbacks as the default, regardless of the API used, i.e.
- even for a PPC API. Applications which want to use callbacks other
- than MIAMICPU_M68KREG need to specify the type of callback when
- installing the callback hook.
-
- kernel: CPUs used for the implementation of the kernel, i.e. the
- CPUs which execute most of the code in the kernel. Using one of the
- models listed here for APIs and callbacks may provide better
- performance than other models listed in "apis" or "callbacks".
-
- INPUTS
- apis - supported APIs
-
- callbacks - supported callbacks
-
- kernel - supported CPUs in kernel
-
- miami.library/MiamiSupportsIPV6 miami.library/MiamiSupportsIPV6
-
- NAME
- MiamiSupportsIPV6 -- Check if IPv6 is supported (V11)
-
- SYNOPSIS
- success = MiamiSupportsIPV6();
- D0
-
- long MiamiSupportsIPV6 (void);
-
- FUNCTION
- This function returns TRUE if IPv6 is supported by this protocol
- stack, and FALSE otherwise.
-
- RESULT
- success (D0) - success
-
- miami.library/MiamiSysCtl miami.library/MiamiSysCtl
-
- NAME
- MiamiSysCtl -- read or write system parameters (V3)
-
- SYNOPSIS
- error = MiamiSysCtl( name, namelen, oldp, oldlenp, newp, newlen,
- D0 A0 D0 A1 A2 A3 D1
- len );
- D0
-
- int MiamiSysCtl( long *name, unsigned long namelen, void *oldp, long
- *oldlenp, void *newp, long newlen, int len );
-
- FUNCTION
- This function allows the application to examine and change system
- parameters, which are defined by their position in a system-wide
- object tree. The "name" parameter does not point to a character
- string, but to an array of long definining the position of the object
- within the object tree.
-
- For instance the object "net.inet.ip.forwarding" would be defined by
- the name array {CTL_NET,AF_INET,IPPROTO_IP,IPCTL_FORWARDING}, with a
- length of 4.
-
- To fetch a value, oldp points to a buffer into which Miami stores the
- value. oldlenp is a value-result argument: when the function is
- called the value pointed to by oldlenp specifies the size of the
- buffer, and on return the value contains the amount of data stored in
- the buffer by Miami. If the buffer is not large enough an error (-1)
- is returned, with errno set to ENOMEM.
-
- As a special case, oldp can be a null pointer, and oldlenp a nonnull
- pointer, and Miami determines how much data the call would have
- returned, and returns this size through oldlenp.
-
- To set a new value, newp points to a buffer of size newlen. If a new
- value is not being specified, newp should be a null pointer, and
- newlen should be 0.
-
- INPUTS
- name - object name
-
- namelen - length of object name
-
- oldp - buffer for old value
-
- oldlenp - pointer to length of buffer for old value
-
- newp - buffer for new value
-
- newlen - length of buffer for new value
-
- len - address length
-
- RESULT
- error (D0) - error code
-
- miami.library/sockatmark miami.library/sockatmark
-
- NAME
- sockatmark -- Check if socket is at an out-of-band mark (V11)
-
- SYNOPSIS
- result = sockatmark( sockfd );
- D0 D0
-
- long sockatmark( long sockfd );
-
- FUNCTION
- This function checks if the receive stream of the specified socket is
- currently at the out-of-band mark. The function returns 1 in that
- case, 0 otherwise.
-
- INPUTS
- sockfd - socket descriptor
-
- RESULT
- result (D0) - result code
-
-