diff options
author | mrb0nk500 <b0nk@b0nk.xyz> | 2023-03-01 17:28:07 -0400 |
---|---|---|
committer | mrb0nk500 <b0nk@b0nk.xyz> | 2023-03-01 17:28:07 -0400 |
commit | 0d82cc507e0c49e2871f18a7f574b3071b51f4a1 (patch) | |
tree | 3ceb935b7387767da7324febc707165eb354d6b5 /context.h | |
parent | 926f5f5ec7992651d2e0602f4fdb77f8be8a5ae5 (diff) |
TTcpSocket: Match `open()`
I might do `test_connection()` next, if not, `TProtocol` will be next.
Diffstat (limited to 'context.h')
-rw-r--r-- | context.h | 54 |
1 files changed, 53 insertions, 1 deletions
@@ -484,8 +484,26 @@ u32 render_shadow_flags; u32 old_render_shadow_flags; u32 some_id_805c6f74; -// THeap.cpp +// TTcpSocket.cpp // func defs. +extern void func_80019aa0(); +extern void controller_stuff(); +extern char func_801a5d1c(); +extern void render_tick(); +extern void func_803d96a4(); +extern short tcp_abort(short nh); +extern short tcp_bind(short nh, struct at_ip_addr *addr, u16 port); +extern short tcp_connect(short nh, struct at_ip_addr *addr, u16 port, struct at_ip_option *option); +extern short tcp_create(); +extern short tcp_delete(short nh); +extern short tcp_get_opt(short nh, short type, u32 *opt); +extern short tcp_send(short nh, void (*notify)(short size, short sock_fd), char bufnum, struct send_buffs *sb); +extern short tcp_stat(short nh, short *stat, short *backlog, u32 *sendwin, u32 *recvwin); +extern short tcp_receive(short nh, void (*notify)(short size, short sock_fd), short len, u8 *buf); +extern int get_link_status(); +extern char *get_sock_status_name(short code); + +// THeap.cpp extern void heap_xfree(void *ptr); extern void *heap_xmalloc(size_t size); @@ -519,6 +537,40 @@ struct packet_header { void bswap(); } __packed__; +// TTcpSocket.cpp, but they're really from AVE-TCP +struct at_ip4_opt { + u8 ttl; + u8 svctype; + u8 df_flag; +}; + +struct at_ip6_opt { + u8 traffic_class; + u32 flow_label; + u8 hop_limit; +}; + +struct at_ip_option { + u32 type; + union { + struct at_ip6_opt ip6; + struct at_ip4_opt ip4; + } ip46; +}; + +struct at_ip_addr { + u32 type; + union { + u8 ip6[16]; + u32 ip4; + } ip46; +}; + +struct send_buffs { + short len; + u8 *buff; +}; + // pso/TSocket.h // Union defs. union ipv4_addr { |