syscall.sh / alpha / gethostname
gethostname
get/set hostname
sys_gethostname(char *name, int len)
| number | 87 (0x57) |
|---|---|
| abi | common |
| entry point | sys_gethostname |
| since | Linux 5.0 |
| man page | gethostname(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
v0 | 87, the syscall number |
a0 | char *name |
a1 | int len |
v0 | the return value |
Then run callsys to enter the kernel.
Get this as JSON: https://api.syscall.sh/v2/syscalls/alpha/gethostname