1/*
2 * Broadcom security module ipc ports file
3 *
4 * Copyright (C) 2013, Broadcom Corporation. All Rights Reserved.
5 *
6 * Permission to use, copy, modify, and/or distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
9 *
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
13 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
15 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
16 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 *
18 * $Id: security_ipc.h 407896 2013-06-14 23:31:52Z $
19 */
20
21#ifndef __SECURITY_IPC_H__
22#define __SECURITY_IPC_H__
23
24/*
25 * WAI module
26 */
27#define WAI_UI_ADDR			"127.0.0.1"
28#define WAP_UI_PORT			9002
29
30/*
31 * AS module
32 */
33#define AS_UI_ADDR			"127.0.0.1"
34#define AS_UI_PORT			9001
35#define AS_WAI_PORT			3810
36
37/*
38 * EAP module
39 */
40#define EAPD_WKSP_UDP_ADDR		"127.0.0.1"
41
42/* get_ifname_unit() index is << 4 */
43#define EAPD_WKSP_PORT_INDEX_SHIFT	4
44#define EAPD_WKSP_SPORT_OFFSET		(1 << 5)
45#define EAPD_WKSP_MPORT_OFFSET		(1 << 6)
46#define EAPD_WKSP_VX_PORT_OFFSET	(1 << 7)
47
48#define EAPD_WKSP_WPS_UDP_PORT		37000
49#define EAPD_WKSP_WPS_UDP_RPORT		EAPD_WKSP_WPS_UDP_PORT
50#define EAPD_WKSP_WPS_UDP_SPORT		EAPD_WKSP_WPS_UDP_PORT + EAPD_WKSP_SPORT_OFFSET
51#define EAPD_WKSP_WPS_UDP_MPORT		EAPD_WKSP_WPS_UDP_PORT + EAPD_WKSP_MPORT_OFFSET
52
53#define EAPD_WKSP_NAS_UDP_PORT		38000
54#define EAPD_WKSP_NAS_UDP_RPORT		EAPD_WKSP_NAS_UDP_PORT
55#define EAPD_WKSP_NAS_UDP_SPORT		EAPD_WKSP_NAS_UDP_PORT + EAPD_WKSP_SPORT_OFFSET
56
57#define EAPD_WKSP_SES_UDP_PORT		39000
58#define EAPD_WKSP_SES_UDP_RPORT		EAPD_WKSP_SES_UDP_PORT
59#define EAPD_WKSP_SES_UDP_SPORT		EAPD_WKSP_SES_UDP_PORT + EAPD_WKSP_SPORT_OFFSET
60
61#define EAPD_WKSP_WAI_UDP_PORT		41000
62#define EAPD_WKSP_WAI_UDP_RPORT 	EAPD_WKSP_WAI_UDP_PORT
63#define EAPD_WKSP_WAI_UDP_SPORT 	EAPD_WKSP_WAI_UDP_PORT + EAPD_WKSP_SPORT_OFFSET
64
65#define EAPD_WKSP_DCS_UDP_PORT		42000
66#define EAPD_WKSP_DCS_UDP_RPORT 	EAPD_WKSP_DCS_UDP_PORT
67#define EAPD_WKSP_DCS_UDP_SPORT 	EAPD_WKSP_DCS_UDP_PORT + EAPD_WKSP_SPORT_OFFSET
68
69#define EAPD_WKSP_DIF_UDP_PORT		43000
70
71#define EAPD_WKSP_MEVENT_UDP_PORT	44000
72#define EAPD_WKSP_MEVENT_UDP_RPORT 	EAPD_WKSP_MEVENT_UDP_PORT
73#define EAPD_WKSP_MEVENT_UDP_SPORT 	EAPD_WKSP_MEVENT_UDP_PORT + EAPD_WKSP_SPORT_OFFSET
74
75#define EAPD_WKSP_BSD_UDP_PORT		45000
76#define EAPD_WKSP_BSD_UDP_RPORT 	EAPD_WKSP_BSD_UDP_PORT
77#define EAPD_WKSP_BSD_UDP_SPORT 	EAPD_WKSP_BSD_UDP_PORT + EAPD_WKSP_SPORT_OFFSET
78
79/*
80 * UPNP module
81 */
82#define	UPNP_IPC_ADDR			"127.0.0.1"
83#define UPNP_WFA_ADDR			"127.0.0.1"
84
85#define UPNP_IPC_PORT			40100
86#define UPNP_WFA_PORT			40040		/* WFA wlan receive port */
87
88/* WPS UPNP definitions */
89#define UPNP_WPS_TYPE_SSR		1		/* Set Selected Registrar */
90#define UPNP_WPS_TYPE_PMR		2		/* Wait For Put Message Resp */
91#define UPNP_WPS_TYPE_GDIR		3		/* Wait For Get DevInfo Resp */
92#define UPNP_WPS_TYPE_PWR		4		/* Put WLAN Response */
93#define UPNP_WPS_TYPE_WE		5		/* WLAN Event */
94#define UPNP_WPS_TYPE_QWFAS		6		/* Query WFAWLANConfig Subscribers */
95#define UPNP_WPS_TYPE_DISCONNECT	7		/* Subscriber unreachable */
96#define UPNP_WPS_TYPE_MAX		8
97
98typedef struct {
99	unsigned int type;
100	unsigned char dst_addr[16];
101	unsigned int length;
102	unsigned char data[1];
103} UPNP_WPS_CMD;
104
105#define UPNP_WPS_CMD_SIZE		24
106
107/*
108 * WPS module
109 */
110#define WPS_EAP_ADDR			"127.0.0.1"
111#define WPS_UPNPDEV_ADDR		"127.0.0.1"
112
113#define WPS_UPNPDEV_PORT		40000
114
115#endif	/* __SECURITY_IPC_H__ */
116