Initial commit
This commit is contained in:
187
sfd/bsdsocket_lib.sfd
Normal file
187
sfd/bsdsocket_lib.sfd
Normal file
@ -0,0 +1,187 @@
|
||||
==id $Id: bsdsocket_lib.sfd,v 1.12 2006-02-18 11:04:35 obarthel Exp $
|
||||
* "bsdsocket.library"
|
||||
==base _SocketBase
|
||||
==bias 30
|
||||
==public
|
||||
==include <exec/lists.h>
|
||||
==include <devices/timer.h>
|
||||
==include <utility/tagitem.h>
|
||||
==include <utility/hooks.h>
|
||||
==include <netinet/in.h>
|
||||
==include <sys/socket.h>
|
||||
==include <sys/mbuf.h>
|
||||
==include <net/route.h>
|
||||
==include <netdb.h>
|
||||
==include <libraries/bsdsocket.h>
|
||||
==include <dos/dosextens.h>
|
||||
*
|
||||
LONG socket(LONG domain,LONG type,LONG protocol) (d0,d1,d2)
|
||||
LONG bind(LONG sock,struct sockaddr *name,socklen_t namelen) (d0,a0,d1)
|
||||
LONG listen(LONG sock,LONG backlog) (d0,d1)
|
||||
LONG accept(LONG sock,struct sockaddr *addr,socklen_t *addrlen) (d0,a0,a1)
|
||||
LONG connect(LONG sock,struct sockaddr *name,socklen_t namelen) (d0,a0,d1)
|
||||
LONG sendto(LONG sock,APTR buf,LONG len,LONG flags,struct sockaddr *to,socklen_t tolen) (d0,a0,d1,d2,a1,d3)
|
||||
LONG send(LONG sock,APTR buf,LONG len,LONG flags) (d0,a0,d1,d2)
|
||||
LONG recvfrom(LONG sock,APTR buf,LONG len,LONG flags,struct sockaddr *addr,socklen_t *addrlen) (d0,a0,d1,d2,a1,a2)
|
||||
LONG recv(LONG sock,APTR buf,LONG len,LONG flags) (d0,a0,d1,d2)
|
||||
LONG shutdown(LONG sock,LONG how) (d0,d1)
|
||||
LONG setsockopt(LONG sock,LONG level,LONG optname,APTR optval,socklen_t optlen) (d0,d1,d2,a0,d3)
|
||||
LONG getsockopt(LONG sock,LONG level,LONG optname,APTR optval,socklen_t *optlen) (d0,d1,d2,a0,a1)
|
||||
LONG getsockname(LONG sock,struct sockaddr *name,socklen_t *namelen) (d0,a0,a1)
|
||||
LONG getpeername(LONG sock,struct sockaddr *name,socklen_t *namelen) (d0,a0,a1)
|
||||
LONG IoctlSocket(LONG sock,ULONG req,APTR argp) (d0,d1,a0)
|
||||
LONG CloseSocket(LONG sock) (d0)
|
||||
LONG WaitSelect(LONG nfds,APTR read_fds,APTR write_fds,APTR except_fds,struct timeval *_timeout,ULONG *signals) (d0,a0,a1,a2,a3,d1)
|
||||
VOID SetSocketSignals(ULONG int_mask,ULONG io_mask,ULONG urgent_mask) (d0,d1,d2)
|
||||
LONG getdtablesize() ()
|
||||
LONG ObtainSocket(LONG id,LONG domain,LONG type,LONG protocol) (d0,d1,d2,d3)
|
||||
LONG ReleaseSocket(LONG sock,LONG id) (d0,d1)
|
||||
LONG ReleaseCopyOfSocket(LONG sock,LONG id) (d0,d1)
|
||||
LONG Errno() ()
|
||||
VOID SetErrnoPtr(APTR errno_ptr,LONG size) (a0,d0)
|
||||
STRPTR Inet_NtoA(in_addr_t ip) (d0)
|
||||
in_addr_t inet_addr(STRPTR cp) (a0)
|
||||
in_addr_t Inet_LnaOf(in_addr_t in) (d0)
|
||||
in_addr_t Inet_NetOf(in_addr_t in) (d0)
|
||||
in_addr_t Inet_MakeAddr(in_addr_t net,in_addr_t host) (d0,d1)
|
||||
in_addr_t inet_network(STRPTR cp) (a0)
|
||||
struct hostent *gethostbyname(STRPTR name) (a0)
|
||||
struct hostent *gethostbyaddr(STRPTR addr,LONG len,LONG type) (a0,d0,d1)
|
||||
struct netent *getnetbyname(STRPTR name) (a0)
|
||||
struct netent *getnetbyaddr(in_addr_t net,LONG type) (d0,d1)
|
||||
struct servent *getservbyname(STRPTR name,STRPTR proto) (a0,a1)
|
||||
struct servent *getservbyport(LONG port,STRPTR proto) (d0,a0)
|
||||
struct protoent *getprotobyname(STRPTR name) (a0)
|
||||
struct protoent *getprotobynumber(LONG proto) (d0)
|
||||
VOID vsyslog(LONG pri,STRPTR msg,APTR args) (d0,a0,a1)
|
||||
==varargs
|
||||
VOID syslog(LONG pri,STRPTR msg,LONG first_parameter,...) (d0,a0,a1)
|
||||
LONG Dup2Socket(LONG old_socket,LONG new_socket) (d0,d1)
|
||||
LONG sendmsg(LONG sock,struct msghdr *msg,LONG flags) (d0,a0,d1)
|
||||
LONG recvmsg(LONG sock,struct msghdr *msg,LONG flags) (d0,a0,d1)
|
||||
LONG gethostname(STRPTR name,LONG namelen) (a0,d0)
|
||||
in_addr_t gethostid() ()
|
||||
LONG SocketBaseTagList(struct TagItem *tags) (a0)
|
||||
==varargs
|
||||
LONG SocketBaseTags(Tag first_tag,...) (a0)
|
||||
LONG GetSocketEvents(ULONG *event_ptr) (a0)
|
||||
* Ten reserved slots for future expansion
|
||||
==reserve 10
|
||||
* Berkeley Packet Filter (Roadshow extensions start here)
|
||||
LONG bpf_open(LONG channel) (d0)
|
||||
LONG bpf_close(LONG channel) (d0)
|
||||
LONG bpf_read(LONG channel, APTR buffer, LONG len) (d0,a0,d1)
|
||||
LONG bpf_write(LONG channel, APTR buffer, LONG len) (d0,a0,d1)
|
||||
LONG bpf_set_notify_mask(LONG channel, ULONG signal_mask) (d1,d0)
|
||||
LONG bpf_set_interrupt_mask(LONG channel, ULONG signal_mask) (d0,d1)
|
||||
LONG bpf_ioctl(LONG channel, ULONG command, APTR buffer) (d0,d1,a0)
|
||||
LONG bpf_data_waiting(LONG channel) (d0)
|
||||
* Route management
|
||||
LONG AddRouteTagList(struct TagItem *tags) (a0)
|
||||
==varargs
|
||||
LONG AddRouteTags(Tag first_tag,...) (a0)
|
||||
LONG DeleteRouteTagList(struct TagItem *tags) (a0)
|
||||
==varargs
|
||||
LONG DeleteRouteTags(Tag first_tag,...) (a0)
|
||||
==private
|
||||
* This is still unimplemented...
|
||||
LONG ChangeRouteTagList(struct TagItem *tags) (a0)
|
||||
==varargs
|
||||
LONG ChangeRouteTags(Tag first_tag,...) (a0)
|
||||
==public
|
||||
VOID FreeRouteInfo(struct rt_msghdr *buf) (a0)
|
||||
struct rt_msghdr * GetRouteInfo(LONG address_family, LONG flags) (d0,d1)
|
||||
* Interface management
|
||||
LONG AddInterfaceTagList(STRPTR interface_name,STRPTR device_name,LONG unit,struct TagItem *tags) (a0,a1,d0,a2)
|
||||
==varargs
|
||||
LONG AddInterfaceTags(STRPTR interface_name,STRPTR device_name,LONG unit,Tag first_tag,...) (a0,a1,d0,a2)
|
||||
LONG ConfigureInterfaceTagList(STRPTR interface_name,struct TagItem *tags) (a0,a1)
|
||||
==varargs
|
||||
LONG ConfigureInterfaceTags(STRPTR interface_name,Tag first_tag,...) (a0,a1)
|
||||
VOID ReleaseInterfaceList(struct List *list) (a0)
|
||||
struct List *ObtainInterfaceList() ()
|
||||
LONG QueryInterfaceTagList(STRPTR interface_name,struct TagItem *tags) (a0,a1)
|
||||
==varargs
|
||||
LONG QueryInterfaceTags(STRPTR interface_name,Tag first_tag,...) (a0,a1)
|
||||
LONG CreateAddrAllocMessageA(LONG version,LONG protocol,STRPTR interface_name,struct AddressAllocationMessage **result_ptr,struct TagItem *tags) (d0,d1,a0,a1,a2)
|
||||
==varargs
|
||||
LONG CreateAddrAllocMessage(LONG version,LONG protocol,STRPTR interface_name,struct AddressAllocationMessage **result_ptr,Tag first_tag,...) (d0,d1,a0,a1,a2)
|
||||
VOID DeleteAddrAllocMessage(struct AddressAllocationMessage *aam) (a0)
|
||||
VOID BeginInterfaceConfig(struct AddressAllocationMessage * message) (a0)
|
||||
VOID AbortInterfaceConfig(struct AddressAllocationMessage * message) (a0)
|
||||
* Monitor management
|
||||
LONG AddNetMonitorHookTagList(LONG type,struct Hook *hook,struct TagItem *tags) (d0,a0,a1)
|
||||
==varargs
|
||||
LONG AddNetMonitorHookTags(LONG type,struct Hook *hook,Tag first_tag,...) (d0,a0,a1)
|
||||
VOID RemoveNetMonitorHook(struct Hook *hook) (a0)
|
||||
* Status query
|
||||
LONG GetNetworkStatistics(LONG type,LONG version,APTR destination,LONG size) (d0,d1,a0,d2)
|
||||
* Domain name server management
|
||||
LONG AddDomainNameServer(STRPTR address) (a0)
|
||||
LONG RemoveDomainNameServer(STRPTR address) (a0)
|
||||
VOID ReleaseDomainNameServerList(struct List *list) (a0)
|
||||
struct List *ObtainDomainNameServerList() ()
|
||||
* Local database access
|
||||
VOID setnetent(LONG stay_open) (d0)
|
||||
VOID endnetent() ()
|
||||
struct netent * getnetent() ()
|
||||
VOID setprotoent(LONG stay_open) (d0)
|
||||
VOID endprotoent() ()
|
||||
struct protoent * getprotoent() ()
|
||||
VOID setservent(LONG stay_open) (d0)
|
||||
VOID endservent() ()
|
||||
struct servent * getservent() ()
|
||||
* Address conversion
|
||||
LONG inet_aton(STRPTR cp,struct in_addr *addr) (a0,a1)
|
||||
STRPTR inet_ntop(LONG af,APTR src,STRPTR dst,LONG size) (d0,a0,a1,d1)
|
||||
LONG inet_pton(LONG af,STRPTR src,APTR dst) (d0,a0,a1)
|
||||
LONG In_LocalAddr(in_addr_t address) (d0)
|
||||
LONG In_CanForward(in_addr_t address) (d0)
|
||||
* Kernel memory management
|
||||
struct mbuf *mbuf_copym(struct mbuf *m, LONG off, LONG len) (a0,d0,d1)
|
||||
LONG mbuf_copyback(struct mbuf *m, LONG off, LONG len, APTR cp) (a0,d0,d1,a1)
|
||||
LONG mbuf_copydata(struct mbuf *m, LONG off, LONG len, APTR cp) (a0,d0,d1,a1)
|
||||
struct mbuf *mbuf_free(struct mbuf *m) (a0)
|
||||
VOID mbuf_freem(struct mbuf *m) (a0)
|
||||
struct mbuf *mbuf_get() ()
|
||||
struct mbuf *mbuf_gethdr() ()
|
||||
struct mbuf *mbuf_prepend(struct mbuf *m, LONG len) (a0,d0)
|
||||
LONG mbuf_cat(struct mbuf *m, struct mbuf *n) (a0,a1)
|
||||
LONG mbuf_adj(struct mbuf *mp, LONG req_len) (a0,d0)
|
||||
struct mbuf *mbuf_pullup(struct mbuf *m, LONG len) (a0,d0)
|
||||
* Internet servers
|
||||
BOOL ProcessIsServer(struct Process * pr) (a0)
|
||||
LONG ObtainServerSocket() ()
|
||||
* Default domain name
|
||||
BOOL GetDefaultDomainName(STRPTR buffer,LONG buffer_size) (a0,d0)
|
||||
VOID SetDefaultDomainName(STRPTR buffer) (a0)
|
||||
* Global data access
|
||||
struct List *ObtainRoadshowData(LONG access) (d0)
|
||||
VOID ReleaseRoadshowData(struct List *list) (a0)
|
||||
BOOL ChangeRoadshowData(struct List *list,STRPTR name,ULONG length,APTR data) (a0,a1,d0,a2)
|
||||
* The counterpart to AddInterfaceTagList
|
||||
LONG RemoveInterface(STRPTR interface_name, LONG force) (a0, d0)
|
||||
* Reentrant versions of the gethostbyname/gethostbyaddr functions, BSD-style
|
||||
struct hostent * gethostbyname_r(STRPTR name, struct hostent * hp, APTR buf, ULONG buflen, LONG * he) (a0,a1,a2,d0,a3)
|
||||
struct hostent * gethostbyaddr_r(STRPTR addr, LONG len, LONG type, struct hostent * hp, APTR buf, ULONG buflen, LONG * he) (a0,d0,d1,a1,a2,d2,a3)
|
||||
* Two reserved slots for future expansion
|
||||
==reserve 2
|
||||
==private
|
||||
* The IP filtering interface is subject to change!
|
||||
* IP filter management and logging
|
||||
LONG ipf_open(LONG channel) (d0)
|
||||
LONG ipf_close(LONG channel) (d0)
|
||||
LONG ipf_ioctl(LONG channel,ULONG command,APTR buffer) (d0,d1,a0)
|
||||
LONG ipf_log_read(LONG channel,APTR buffer,LONG len) (d0,a0,d1)
|
||||
LONG ipf_log_data_waiting(LONG channel) (d0)
|
||||
LONG ipf_set_notify_mask(LONG channel,ULONG mask) (d0,d1)
|
||||
LONG ipf_set_interrupt_mask(LONG channel,ULONG mask) (d0,d1)
|
||||
==public
|
||||
* Node and service name translation (rfc3493)
|
||||
VOID freeaddrinfo(struct addrinfo *ai) (a0)
|
||||
LONG getaddrinfo(STRPTR hostname, STRPTR servname, struct addrinfo *hints, struct addrinfo **res) (a0,a1,a2,a3)
|
||||
STRPTR gai_strerror(LONG errnum) (a0)
|
||||
LONG getnameinfo(struct sockaddr *sa, ULONG salen, STRPTR host, ULONG hostlen, STRPTR serv, ULONG servlen, ULONG flags) (a0,d0,a1,d1,a2,d2,d3)
|
||||
* Six reserved slots for future expansion
|
||||
==reserve 6
|
||||
==end
|
||||
51
sfd/usergroup_lib.sfd
Normal file
51
sfd/usergroup_lib.sfd
Normal file
@ -0,0 +1,51 @@
|
||||
==id $Id: usergroup_lib.sfd,v 1.4 2004-09-16 08:11:56 obarthel Exp $
|
||||
* "usergroup.library"
|
||||
==base _UserGroupBase
|
||||
==bias 30
|
||||
==public
|
||||
==include <libraries/usergroup.h>
|
||||
==include <pwd.h>
|
||||
==include <grp.h>
|
||||
*
|
||||
LONG ug_SetupContextTagList(STRPTR name,struct TagItem *tags) (a0,a1)
|
||||
==varargs
|
||||
LONG ug_SetupContextTags(STRPTR name,...) (a0,a1)
|
||||
LONG ug_GetErr() ()
|
||||
STRPTR ug_StrError(LONG err) (d1)
|
||||
LONG getuid() ()
|
||||
LONG geteuid() ()
|
||||
LONG setreuid(LONG real,LONG effective) (d0,d1)
|
||||
LONG setuid(LONG uid) (d0)
|
||||
LONG getgid() ()
|
||||
LONG getegid() ()
|
||||
LONG setregid(LONG real,LONG effective) (d0,d1)
|
||||
LONG setgid(LONG gid) (d0)
|
||||
LONG getgroups(LONG gidsetlen,LONG *gidset) (d0,a1)
|
||||
LONG setgroups(LONG gidsetlen,LONG *gidset) (d0,a1)
|
||||
LONG initgroups(STRPTR name,LONG basegid) (a1,d0)
|
||||
struct passwd * getpwnam(STRPTR login) (a1)
|
||||
struct passwd * getpwuid(LONG uid) (d0)
|
||||
VOID setpwent() ()
|
||||
struct passwd * getpwent() ()
|
||||
VOID endpwent() ()
|
||||
struct group * getgrnam(STRPTR name) (a1)
|
||||
struct group * getgrgid(LONG gid) (d0)
|
||||
VOID setgrent() ()
|
||||
struct group * getgrent() ()
|
||||
VOID endgrent() ()
|
||||
UBYTE * crypt(UBYTE *key,UBYTE *set) (a0,a1)
|
||||
UBYTE * ug_GetSalt(struct passwd *user,UBYTE *buf,ULONG size) (a0,a1,d0)
|
||||
STRPTR getpass(STRPTR prompt) (a1)
|
||||
ULONG umask(UWORD mask) (d0)
|
||||
ULONG getumask() ()
|
||||
LONG setsid() ()
|
||||
LONG getpgrp() ()
|
||||
STRPTR getlogin() ()
|
||||
LONG setlogin(STRPTR name) (a1)
|
||||
VOID setutent() ()
|
||||
struct utmp * getutent() ()
|
||||
VOID endutent() ()
|
||||
struct lastlog * getlastlog(LONG uid) (d0)
|
||||
LONG setlastlog(LONG uid,STRPTR name,STRPTR host) (d0,a0,a1)
|
||||
struct UserGroupCredentials *getcredentials(struct Task *task) (a0)
|
||||
==end
|
||||
Reference in New Issue
Block a user