I think I've set up the socket correctly, but I'm having a lot of trouble trying to bind it. I don't really understand what I'm supposed to do. Like do I have to define the socket function somehow and use it as an argument in the bind function? I think I may have made several errors, like passing arguments into the socket function, so I could use some help.
Heres my code:
;this is an attempt at socket programming with x64 ;i will attempt to open a socket, and then immediately close it.
global _start
section .data
domain: db "AF_INET"
sockType: db "SOCK_STREAM"
clientMessage: db "Connection succesfull", 10
serverMessage: db "Client has connected", 10
section .bss
message: RESB 12
section .text
_start:
mov rax, 41
mov rdi, domain
mov rsi, sockType
mov rdx, 0
syscall
mov rax, 60
mov rdi, 1
syscall
note: I'm not yet using the last two constants in .data, they are simply for letting the user know the connection status.
note #2: It assembles without error