Fix server init_ack / cookie_ack & fix accept / connect & starting read / write

This commit is contained in:
Ludovic Chenut 2022-11-21 17:22:40 +01:00
parent e81e7be7c0
commit a22b7c4b03
No known key found for this signature in database
GPG Key ID: D9A59B1907F1D50C
6 changed files with 158 additions and 94 deletions

View File

@ -22,7 +22,10 @@ done
# and put the different flags on prelude.nim depending on the
# OS we're currently on
LIBCFLAGS="$(grep "^LIBCFLAGS = " "${root}/usrsctp/Makefile" | cut -d' ' -f3- | sed 's/-D/--defines=/g')"
LIBCFLAGS="${LIBCFLAGS} --defines=SCTP_DEBUG --defines=HAVE_INET_ADDR=1 --defines=INET=1"
LIBCFLAGS="${LIBCFLAGS}"
for flag in 'STDC_HEADERS=1' 'HAVE_SYS_TYPES_H=1' 'HAVE_SYS_STAT_H=1' 'HAVE_STDLIB_H=1' 'HAVE_STRING_H=1' 'HAVE_MEMORY_H=1' 'HAVE_STRINGS_H=1' 'HAVE_INTTYPES_H=1' 'HAVE_STDINT_H=1' 'HAVE_UNISTD_H=1' 'HAVE_DLFCN_H=1' 'LT_OBJDIR=".libs/"' 'SCTP_DEBUG=1' 'INET=1' 'INET6=1' 'HAVE_SOCKET=1' 'HAVE_INET_ADDR=1' 'HAVE_STDATOMIC_H=1' 'HAVE_SYS_QUEUE_H=1' 'HAVE_LINUX_IF_ADDR_H=1' 'HAVE_LINUX_RTNETLINK_H=1' 'HAVE_NETINET_IP_ICMP_H=1' 'HAVE_NET_ROUTE_H=1' '_GNU_SOURCE'; do
LIBCFLAGS="${LIBCFLAGS} --defines=${flag}"
done
# generate nim wrapper with nimterop
toast \

View File

@ -4,8 +4,8 @@ import ../webrtc/sctp
proc main() {.async.} =
let
sctp = Sctp.new(port = 4244)
address = TransportAddress(initTAddress("127.0.0.1:9899"))
conn = await sctp.connect(address)
address = TransportAddress(initTAddress("127.0.0.1:4242"))
conn = await sctp.connect(address, sctpPort = 13)
await conn.write("toto".toBytes)
await sleepAsync(3.seconds)

View File

@ -3,9 +3,8 @@ import ../webrtc/sctp
proc main() {.async.} =
let
sctp = Sctp.new(isServer = true)
address = initTAddress("127.0.0.1:9899")
conn = await sctp.listen(address)
sctp = Sctp.new(port = 4242, isServer = true, sctpPort = 13)
conn = await sctp.listen()
let msg = await conn.read()
echo string.fromBytes(msg)

View File

@ -3,6 +3,8 @@ import chronos, posix
import ../webrtc/usrsctp
import stew/ranges/ptr_arith
proc printf(format: cstring) {.cdecl, varargs.} = echo "printf"
proc perror(error: cstring) {.importc, cdecl, header: "<errno.h>".}
const IPPROTO_SCTP = 132
let ta = initTAddress("127.0.0.1:4244")
let tar = initTAddress("127.0.0.1:4242")
@ -38,8 +40,6 @@ proc handleUpcall(sock: ptr socket, arg: pointer, length: cint) {.cdecl.} =
else:
echo "/!\\ ERROR /!\\"
proc printf(format: cstring) {.cdecl, varargs.} = echo "printf"
proc handleEvents(dg: DatagramTransport, sock: ptr socket, sconn_addr: pointer) {.async.} =
await sleepAsync(3.seconds)
@ -56,7 +56,7 @@ proc main {.async, gcsafe.} =
usrsctp_init_nothreads(0, connOutput, printf)
discard usrsctp_sysctl_set_sctp_ecn_enable(1)
usrsctp_register_address(p)
let sock = usrsctp_socket(AF_INET, posix.SOCK_STREAM, IPPROTO_SCTP, nil, nil, 0, nil)
let sock = usrsctp_socket(AF_CONN, posix.SOCK_STREAM, IPPROTO_SCTP, nil, nil, 0, nil)
var on: int = 1
doAssert 0 == usrsctp_setsockopt(sock, IPPROTO_SCTP, SCTP_RECVRCVINFO, addr on, sizeof(on).SockLen)
doAssert 0 == usrsctp_set_non_blocking(sock, 1)
@ -70,6 +70,7 @@ proc main {.async, gcsafe.} =
sconn.sconn_port = htons(13)
sconn.sconn_addr = p
let connErr = usrsctp_connect(sock, cast[ptr SockAddr](addr sconn), sizeof(sconn).SockLen)
perror("usrsctp_connect")
doAssert 0 == connErr or errno == EINPROGRESS, ($errno)
await handleEvents(dg, sock, sconn.sconn_addr)

View File

@ -7,7 +7,7 @@
# This file may not be copied, modified, or distributed except according to
# those terms.
import tables, bitops, posix
import tables, bitops, posix, strutils
import chronos, chronicles, stew/ranges/ptr_arith
import usrsctp
@ -18,6 +18,8 @@ logScope:
type
SctpConnection* = ref object
connected: bool
connectEvent: AsyncEvent
sctp: Sctp
udp: DatagramTransport
address: TransportAddress
@ -25,28 +27,37 @@ type
dataRecv: seq[byte]
Sctp* = ref object
running: bool
udp: DatagramTransport
connections: Table[TransportAddress, SctpConnection]
gotConnection: AsyncEvent
case isServer: bool
of true:
sock: ptr socket
pendingConnections: seq[SctpConnection]
of false:
discard
sentFuture: Future[void]
sentConnection: SctpConnection
sentAddress: TransportAddress
const
IPPROTO_SCTP = 132
template usrsctpAwait(sctp: Sctp, body: untyped) =
template usrsctpAwait(sctp: Sctp, body: untyped): untyped =
sctp.sentFuture = nil
body
if sctp.sentFuture != nil:
await sctp.sentFuture
when type(body) is void:
body
if sctp.sentFuture != nil: await sctp.sentFuture
else:
let res = body
if sctp.sentFuture != nil: await sctp.sentFuture
res
proc perror(error: cstring) {.importc, cdecl, header: "<errno.h>".}
proc printf(format: cstring) {.cdecl, varargs.} = echo "printf"
proc printf(format: cstring) {.cdecl, importc: "printf", varargs, header: "<stdio.h>", gcsafe.}
proc `$`(p: pointer): string = "0x" & cast[uint](p).toHex() # TODO: Delete this
proc packetPretty(packet: cstring): string =
let data = $packet
let ctn = data[23..^16]
@ -61,71 +72,91 @@ proc new(T: typedesc[SctpConnection],
udp: DatagramTransport,
address: TransportAddress,
sctpSocket: ptr socket): T =
T(sctp: sctp, udp: udp, address: address, sctpSocket: sctpSocket)
T(sctp: sctp,
udp: udp,
address: address,
sctpSocket: sctpSocket,
connectEvent: AsyncEvent())
proc read*(self: SctpConnection): Future[seq[byte]] = discard
proc read*(self: SctpConnection): Future[seq[byte]] {.async.} =
trace "Read"
let x: seq[byte] = @[]
await sleepAsync(1.seconds)
return x
proc write*(self: SctpConnection, buf: seq[byte]) {.async.} =
trace "Write", buf
self.sctp.sentConnection = self
discard self.sctpSocket.usrsctp_sendv(addr buf, buf.len.uint, nil, 0, nil, 0, SCTP_SENDV_NOINFO, 0)
self.sctp.sentAddress = self.address
let sendvErr = self.sctp.usrsctpAwait:
self.sctpSocket.usrsctp_sendv(addr buf, buf.len.uint,
nil, 0, nil, 0,
SCTP_SENDV_NOINFO, 0)
echo "??? ", sendvErr
await self.sctp.sentFuture
echo "!!!"
proc close*(self: SctpConnection) {.async.} = discard
proc close*(self: SctpConnection) {.async.} =
trace "Close"
proc handleUpcall(sock: ptr socket, data: pointer, flags: cint) {.cdecl.} =
let events = usrsctp_get_events(sock)
let
events = usrsctp_get_events(sock)
conn = cast[SctpConnection](data)
trace "Handle Upcall", events
if bitor(events, SCTP_EVENT_WRITE) != 0: # and not connected:
echo "connect"
#connected = true
elif bitor(events, SCTP_EVENT_READ) != 0:
if not conn.connected:
if bitand(events, SCTP_EVENT_ERROR) != 0:
discard
# TODO: raise smthg
elif bitand(events, SCTP_EVENT_WRITE) != 0:
conn.connected = true
conn.connectEvent.fire()
elif bitand(events, SCTP_EVENT_READ) != 0:
echo "recv"
else:
echo "/!\\ ERROR /!\\"
warn "Handle Upcall unexpected event", events
proc handleAccept(sock: ptr socket, data: pointer, flags: cint) {.cdecl.} =
trace "Handle Accept"
var
sin: Sockaddr_in
size: SockLen
ipaddress: IpAddress
port: Port
trace "Handle Accept", data
let
sctp: Sctp = cast[ptr Sctp](data)[]
sctpSocket = usrsctp_accept(sctp.sock,
cast[ptr SockAddr](addr sin),
cast[ptr SockLen](addr size))
sin.fromSockAddr(sizeof(sin).SockLen, ipaddress, port)
let address = initTAddress(ipaddress, port)
sctp.connections[address] = SctpConnection.new(sctp, sctp.udp, address, sctpSocket)
sctp = cast[Sctp](data)
sctpSocket = usrsctp_accept(sctp.sock, nil, nil)
doAssert 0 == sctpSocket.usrsctp_set_non_blocking(1)
let conn = SctpConnection.new(sctp, sctp.udp, sctp.sentAddress, sctpSocket)
sctp.connections[sctp.sentAddress] = conn
sctp.pendingConnections.add(conn)
conn.connected = true
doAssert 0 == sctpSocket.usrsctp_set_upcall(handleUpcall, cast[pointer](conn))
sctp.gotConnection.fire()
proc getOrCreateConnection(self: Sctp,
udp: DatagramTransport,
address: TransportAddress): SctpConnection =
address: TransportAddress,
sctpPort: uint16 = 5000): Future[SctpConnection] {.async.} =
#TODO remove the = 5000
if self.connections.hasKey(address):
return self.connections[address]
trace "Create Connection", address
let
sctpSocket = usrsctp_socket(AF_CONN, posix.SOCK_STREAM, IPPROTO_SCTP, nil, nil, 0, nil)
conn = SctpConnection.new(self, udp, address, sctpSocket)
sctpPtr = cast[pointer](addr self)
var on: int = 1
doAssert 0 == usrsctp_setsockopt(conn.sctpSocket,
IPPROTO_SCTP,
SCTP_RECVRCVINFO,
addr on,
sizeof(on).SockLen)
doAssert 0 == conn.sctpSocket.usrsctp_setsockopt(IPPROTO_SCTP,
SCTP_RECVRCVINFO,
addr on,
sizeof(on).SockLen)
doAssert 0 == usrsctp_set_non_blocking(conn.sctpSocket, 1)
doAssert 0 == usrsctp_set_upcall(conn.sctpSocket, handleUpcall, nil)
doAssert 0 == usrsctp_set_upcall(conn.sctpSocket, handleUpcall, cast[pointer](conn))
var sconn: Sockaddr_conn
sconn.sconn_family = AF_CONN
sconn.sconn_port = htons(5000)
sconn.sconn_addr = sctpPtr
sconn.sconn_port = htons(sctpPort)
sconn.sconn_addr = cast[pointer](self)
self.sentConnection = conn
echo "=======> Avant connect"
discard conn.sctpSocket.usrsctp_connect(cast[ptr SockAddr](addr sconn), SockLen(sizeof(sconn)))
echo "Après connect <======="
self.sentAddress = address
let connErr = self.usrsctpAwait:
conn.sctpSocket.usrsctp_connect(cast[ptr SockAddr](addr sconn), SockLen(sizeof(sconn)))
doAssert 0 == connErr or errno == EINPROGRESS, ($errno)
self.connections[address] = conn
return conn
@ -138,81 +169,90 @@ proc sendCallback(address: pointer,
if data != nil:
trace "sendCallback", data = data.packetPretty(), length
usrsctp_freedumpbuffer(data)
let sctp: Sctp = (cast[ptr Sctp](address))[]
let sctp = cast[Sctp](address)
proc testSend() {.async.} =
try:
let
buf = @(buffer.makeOpenArray(byte, int(length)))
address = sctp.sentConnection.address
address = sctp.sentAddress
trace "Send To", address
await sendTo(sctp.udp, address, buf, int(length))
except CatchableError as exc:
echo "Failure: ", exc.msg
sctp.sentFuture = testSend()
proc new*(T: typedesc[Sctp], port: uint16 = 9899, isServer: bool = false): T =
proc new*(T: typedesc[Sctp],
port: uint16 = 9899,
isServer: bool = false,
sctpPort: uint16 = 5000): T =
logScope: topics = "webrtc sctp"
let
sctp = T(gotConnection: newAsyncEvent(), isServer: isServer)
sctpPtr = cast[pointer](addr sctp)
let sctp = T(gotConnection: newAsyncEvent(), isServer: isServer)
proc onReceive(udp: DatagramTransport, address: TransportAddress) {.async, gcsafe.} =
let
msg = udp.getMessage()
data = usrsctp_dumppacket(addr msg[0], uint(msg.len), SCTP_DUMP_INBOUND)
if data != nil:
trace "onReceive", data = data.packetPretty(), length = msg.len()
trace "onReceive", server = sctp.isServer, data = data.packetPretty(), length = msg.len()
usrsctp_freedumpbuffer(data)
if sctp.isServer:
echo "OnReceive (server): ", sctp.connections.len
var sin: Sockaddr_in
var slen: SockLen
discard sctp.sock.usrsctp_accept(cast[ptr SockAddr](addr sin), addr slen)
perror("usrsctp_accept")
echo sin.sin_port, " ", sin.sin_addr.s_addr, " ", slen
usrsctp_conninput(sctpPtr, addr msg[0], uint(msg.len), 0)
sctp.sentAddress = address
usrsctp_conninput(cast[pointer](sctp), addr msg[0], uint(msg.len), 0)
else:
echo "OnReceive (client): ", sctp.connections.len
let conn = sctp.getOrCreateConnection(udp, address)
let conn = await sctp.getOrCreateConnection(udp, address)
# TODO: Sctp Port? Read on the packet and get the port? I guess?
sctp.sentConnection = conn
usrsctp_conninput(sctpPtr, addr msg[0], uint(msg.len), 0)
sctp.sentAddress = address
echo "=> Address ", address
usrsctp_conninput(cast[pointer](sctp), addr msg[0], uint(msg.len), 0)
let
localAddr = TransportAddress(family: AddressFamily.IPv4, port: Port(port))
trace "local address", localAddr
let
udp = newDatagramTransport(onReceive, local = localAddr)
laddr = initTAddress("127.0.0.1:" & $port)
udp = newDatagramTransport(onReceive, local = laddr)
trace "local address", localAddr, laddr
sctp.udp = udp
usrsctp_init_nothreads(0, sendCallback, nil)
discard usrsctp_sysctl_set_sctp_ecn_enable(1)
usrsctp_register_address(sctpPtr)
if isServer:
if not isServer:
usrsctp_init_nothreads(0, sendCallback, printf)
discard usrsctp_sysctl_set_sctp_debug_on(SCTP_DEBUG_NONE)
discard usrsctp_sysctl_set_sctp_ecn_enable(1)
usrsctp_register_address(cast[pointer](sctp))
else:
usrsctp_init_nothreads(port, sendCallback, printf)
discard usrsctp_sysctl_set_sctp_debug_on(SCTP_DEBUG_ALL.uint32)
doAssert 0 == usrsctp_sysctl_set_sctp_blackhole(2)
doAssert 0 == usrsctp_sysctl_set_sctp_no_csum_on_loopback(0)
let sock = usrsctp_socket(AF_INET, posix.SOCK_STREAM, IPPROTO_SCTP, nil, nil, 0, nil)
let sock = usrsctp_socket(AF_CONN, posix.SOCK_STREAM, IPPROTO_SCTP, nil, nil, 0, nil)
perror("usrsctp_socket")
var on: int = 1
doAssert 0 == usrsctp_setsockopt(sock, IPPROTO_SCTP, SCTP_RECVRCVINFO, addr on, SockLen(sizeof(on)))
doAssert 0 == usrsctp_set_non_blocking(sock, 1)
doAssert 0 == sock.usrsctp_set_upcall(handleAccept, sctpPtr)
var sconn: Sockaddr_conn
sconn.sconn_family = AF_CONN
sconn.sconn_port = htons(5000)
sconn.sconn_addr = nil
doAssert 0 == usrsctp_bind(sock, cast[ptr SockAddr](addr sconn), SockLen(sizeof(sconn)))
var sin: Sockaddr_in
sin.sin_family = AF_INET.uint16
sin.sin_port = htons(sctpPort)
sin.sin_addr.s_addr = htonl(INADDR_ANY)
doAssert 0 == usrsctp_bind(sock, cast[ptr SockAddr](addr sin), SockLen(sizeof(Sockaddr_in)))
doAssert 0 >= usrsctp_listen(sock, 1)
doAssert 0 == sock.usrsctp_set_upcall(handleAccept, cast[pointer](sctp))
sctp.sock = sock
sctp.running = true
return sctp
proc listen*(self: Sctp, address: TransportAddress): Future[SctpConnection] {.async.} =
while true:
echo "Listening"
if self.connections.hasKey(address):
return self.connections[address]
proc listen*(self: Sctp): Future[SctpConnection] {.async.} =
if not self.isServer:
# TODO: raise smthg
return
echo "Listening"
if self.pendingConnections.len == 0:
self.gotConnection.clear()
await self.gotConnection.wait()
let res = self.pendingConnections[0]
self.pendingConnections.delete(0)
return res
proc connect*(self: Sctp, address: TransportAddress): Future[SctpConnection] {.async.} =
proc connect*(self: Sctp, address: TransportAddress, sctpPort: uint16 = 5000): Future[SctpConnection] {.async.} =
trace "Connect", address
let conn = self.getOrCreateConnection(self.udp, address)
return conn
let conn = await self.getOrCreateConnection(self.udp, address, sctpPort)
await conn.connectEvent.wait()
if conn.connected: return conn
else: discard # TODO: raise smthg

View File

@ -9,9 +9,9 @@ const usrsctpInclude = root/"usrsctp"/"usrsctplib"
{.passc: fmt"-I{usrsctpInclude}".}
# Generated @ 2022-11-07T15:34:50+01:00
# Generated @ 2022-11-21T15:11:52+01:00
# Command line:
# /home/lchenut/.nimble/pkgs/nimterop-0.6.13/nimterop/toast --compile=./usrsctp/usrsctplib/netinet/sctp_input.c --compile=./usrsctp/usrsctplib/netinet/sctp_asconf.c --compile=./usrsctp/usrsctplib/netinet/sctp_pcb.c --compile=./usrsctp/usrsctplib/netinet/sctp_usrreq.c --compile=./usrsctp/usrsctplib/netinet/sctp_cc_functions.c --compile=./usrsctp/usrsctplib/netinet/sctp_auth.c --compile=./usrsctp/usrsctplib/netinet/sctp_userspace.c --compile=./usrsctp/usrsctplib/netinet/sctp_output.c --compile=./usrsctp/usrsctplib/netinet/sctp_callout.c --compile=./usrsctp/usrsctplib/netinet/sctp_crc32.c --compile=./usrsctp/usrsctplib/netinet/sctp_sysctl.c --compile=./usrsctp/usrsctplib/netinet/sctp_sha1.c --compile=./usrsctp/usrsctplib/netinet/sctp_timer.c --compile=./usrsctp/usrsctplib/netinet/sctputil.c --compile=./usrsctp/usrsctplib/netinet/sctp_bsd_addr.c --compile=./usrsctp/usrsctplib/netinet/sctp_peeloff.c --compile=./usrsctp/usrsctplib/netinet/sctp_indata.c --compile=./usrsctp/usrsctplib/netinet/sctp_ss_functions.c --compile=./usrsctp/usrsctplib/user_socket.c --compile=./usrsctp/usrsctplib/netinet6/sctp6_usrreq.c --compile=./usrsctp/usrsctplib/user_mbuf.c --compile=./usrsctp/usrsctplib/user_environment.c --compile=./usrsctp/usrsctplib/user_recv_thread.c --pnim --preprocess --noHeader --defines=SCTP_PROCESS_LEVEL_LOCKS --defines=SCTP_SIMPLE_ALLOCATOR --defines=__Userspace__ --defines=SCTP_DEBUG --defines=HAVE_INET_ADDR=1 --defines=INET=1 --replace=sockaddr=SockAddr --replace=SockAddr_storage=Sockaddr_storage --replace=SockAddr_in=Sockaddr_in --replace=SockAddr_conn=Sockaddr_conn --replace=socklen_t=SockLen --includeDirs=./usrsctp/usrsctplib ./usrsctp/usrsctplib/usrsctp.h
# /home/lchenut/.nimble/pkgs/nimterop-0.6.13/nimterop/toast --compile=./usrsctp/usrsctplib/netinet/sctp_input.c --compile=./usrsctp/usrsctplib/netinet/sctp_asconf.c --compile=./usrsctp/usrsctplib/netinet/sctp_pcb.c --compile=./usrsctp/usrsctplib/netinet/sctp_usrreq.c --compile=./usrsctp/usrsctplib/netinet/sctp_cc_functions.c --compile=./usrsctp/usrsctplib/netinet/sctp_auth.c --compile=./usrsctp/usrsctplib/netinet/sctp_userspace.c --compile=./usrsctp/usrsctplib/netinet/sctp_output.c --compile=./usrsctp/usrsctplib/netinet/sctp_callout.c --compile=./usrsctp/usrsctplib/netinet/sctp_crc32.c --compile=./usrsctp/usrsctplib/netinet/sctp_sysctl.c --compile=./usrsctp/usrsctplib/netinet/sctp_sha1.c --compile=./usrsctp/usrsctplib/netinet/sctp_timer.c --compile=./usrsctp/usrsctplib/netinet/sctputil.c --compile=./usrsctp/usrsctplib/netinet/sctp_bsd_addr.c --compile=./usrsctp/usrsctplib/netinet/sctp_peeloff.c --compile=./usrsctp/usrsctplib/netinet/sctp_indata.c --compile=./usrsctp/usrsctplib/netinet/sctp_ss_functions.c --compile=./usrsctp/usrsctplib/user_socket.c --compile=./usrsctp/usrsctplib/netinet6/sctp6_usrreq.c --compile=./usrsctp/usrsctplib/user_mbuf.c --compile=./usrsctp/usrsctplib/user_environment.c --compile=./usrsctp/usrsctplib/user_recv_thread.c --pnim --preprocess --noHeader --defines=SCTP_PROCESS_LEVEL_LOCKS --defines=SCTP_SIMPLE_ALLOCATOR --defines=__Userspace__ --defines=STDC_HEADERS=1 --defines=HAVE_SYS_TYPES_H=1 --defines=HAVE_SYS_STAT_H=1 --defines=HAVE_STDLIB_H=1 --defines=HAVE_STRING_H=1 --defines=HAVE_MEMORY_H=1 --defines=HAVE_STRINGS_H=1 --defines=HAVE_INTTYPES_H=1 --defines=HAVE_STDINT_H=1 --defines=HAVE_UNISTD_H=1 --defines=HAVE_DLFCN_H=1 --defines=LT_OBJDIR=".libs/" --defines=SCTP_DEBUG=1 --defines=INET=1 --defines=INET6=1 --defines=HAVE_SOCKET=1 --defines=HAVE_INET_ADDR=1 --defines=HAVE_STDATOMIC_H=1 --defines=HAVE_SYS_QUEUE_H=1 --defines=HAVE_LINUX_IF_ADDR_H=1 --defines=HAVE_LINUX_RTNETLINK_H=1 --defines=HAVE_NETINET_IP_ICMP_H=1 --defines=HAVE_NET_ROUTE_H=1 --defines=_GNU_SOURCE --replace=sockaddr=SockAddr --replace=SockAddr_storage=Sockaddr_storage --replace=SockAddr_in=Sockaddr_in --replace=SockAddr_conn=Sockaddr_conn --replace=socklen_t=SockLen --includeDirs=./usrsctp/usrsctplib ./usrsctp/usrsctplib/usrsctp.h
# const 'SCTP_PACKED' has unsupported value '__attribute__((packed))'
# const 'SCTP_INACTIVE' has unsupported value '0x0002 /* neither SCTP_ADDR_REACHABLE'
@ -23,9 +23,30 @@ const usrsctpInclude = root/"usrsctp"/"usrsctplib"
{.passc: "-DSCTP_PROCESS_LEVEL_LOCKS".}
{.passc: "-DSCTP_SIMPLE_ALLOCATOR".}
{.passc: "-D__Userspace__".}
{.passc: "-DSCTP_DEBUG".}
{.passc: "-DHAVE_INET_ADDR=1".}
{.passc: "-DSTDC_HEADERS=1".}
{.passc: "-DHAVE_SYS_TYPES_H=1".}
{.passc: "-DHAVE_SYS_STAT_H=1".}
{.passc: "-DHAVE_STDLIB_H=1".}
{.passc: "-DHAVE_STRING_H=1".}
{.passc: "-DHAVE_MEMORY_H=1".}
{.passc: "-DHAVE_STRINGS_H=1".}
{.passc: "-DHAVE_INTTYPES_H=1".}
{.passc: "-DHAVE_STDINT_H=1".}
{.passc: "-DHAVE_UNISTD_H=1".}
{.passc: "-DHAVE_DLFCN_H=1".}
{.passc: "-DLT_OBJDIR=\".libs/\"".}
{.passc: "-DSCTP_DEBUG=1".}
{.passc: "-DINET=1".}
{.passc: "-DINET6=1".}
{.passc: "-DHAVE_SOCKET=1".}
{.passc: "-DHAVE_INET_ADDR=1".}
{.passc: "-DHAVE_STDATOMIC_H=1".}
{.passc: "-DHAVE_SYS_QUEUE_H=1".}
{.passc: "-DHAVE_LINUX_IF_ADDR_H=1".}
{.passc: "-DHAVE_LINUX_RTNETLINK_H=1".}
{.passc: "-DHAVE_NETINET_IP_ICMP_H=1".}
{.passc: "-DHAVE_NET_ROUTE_H=1".}
{.passc: "-D_GNU_SOURCE".}
{.passc: "-I./usrsctp/usrsctplib".}
{.compile: "./usrsctp/usrsctplib/netinet/sctp_input.c".}
{.compile: "./usrsctp/usrsctplib/netinet/sctp_asconf.c".}