blob: 26d64326f05d1006a34f841b4ce42d766decd7bb [file] [log] [blame]
Fuad Tabba3e669bc2019-08-08 16:43:55 +01001// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Copyright 2019 The Hafnium Authors.
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * version 2 as published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 */
14
15#pragma once
16
17#include <linux/socket.h>
18
19#include <hf/spci.h>
20
21/* TODO: Reusing AF_ECONET for now as it's otherwise unused. */
22#define AF_HF AF_ECONET
23#define PF_HF AF_HF
24
25/*
26 * Address of a Hafnium socket
27 */
28struct hf_sockaddr {
29 __kernel_sa_family_t family;
30 spci_vm_id_t vm_id;
31 uint64_t port;
32};