# tty_init

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L93
- **Page:** https://libtmux.org/en/tmux/3.2a/reference/c-function-tty_init/

```c
int tty_init(struct tty *tty, struct client *c)
```

## Parameters

- `tty` (`struct tty *`)
- `c` (`struct client *`)

## Called by

- [`server_client_dispatch_identify`](/en/tmux/3.2a/reference/c-function-server-client-c-server_client_dispatch_identify/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/server-client.c#L2310)

## Calls

- [`xstrdup`](/en/tmux/3.2a/reference/c-function-xstrdup/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L102)

## Referenced declarations

- [`tty.ccolour`](/en/tmux/3.2a/reference/c-struct-tty-ccolour/) (attribute)
- [`client`](/en/tmux/3.2a/reference/c-struct-client/) (struct)
- [`tty.client`](/en/tmux/3.2a/reference/c-struct-tty-client/) (attribute)
- [`tty.cstyle`](/en/tmux/3.2a/reference/c-struct-tty-cstyle/) (attribute)
- [`client.fd`](/en/tmux/3.2a/reference/c-struct-client-fd/) (attribute)
- [`tty.tio`](/en/tmux/3.2a/reference/c-struct-tty-tio/) (attribute)
- [`tty`](/en/tmux/3.2a/reference/c-struct-tty/) (struct)
