1/*
2 * Broadcom security module ipc ports file
3 *
4 * Copyright (C) 2015, 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 484299 2014-06-12 23:27:53Z $
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/*borg*/
72#define EAPD_WKSP_MEVENT_UDP_PORT	44000
73#define EAPD_WKSP_MEVENT_UDP_RPORT 	EAPD_WKSP_MEVENT_UDP_PORT
74#define EAPD_WKSP_MEVENT_UDP_SPORT 	EAPD_WKSP_MEVENT_UDP_PORT + EAPD_WKSP_SPORT_OFFSET
75
76#define EAPD_WKSP_BSD_UDP_PORT		45000
77#define EAPD_WKSP_BSD_UDP_RPORT 	EAPD_WKSP_BSD_UDP_PORT
78#define EAPD_WKSP_BSD_UDP_SPORT 	EAPD_WKSP_BSD_UDP_PORT + EAPD_WKSP_SPORT_OFFSET
79
80#define EAPD_WKSP_SSD_UDP_PORT		46000
81#define EAPD_WKSP_SSD_UDP_RPORT 	EAPD_WKSP_SSD_UDP_PORT
82#define EAPD_WKSP_SSD_UDP_SPORT 	EAPD_WKSP_SSD_UDP_PORT + EAPD_WKSP_SPORT_OFFSET
83
84/*
85 * UPNP module
86 */
87#define	UPNP_IPC_ADDR			"127.0.0.1"
88#define UPNP_WFA_ADDR			"127.0.0.1"
89
90#define UPNP_IPC_PORT			40100
91#define UPNP_WFA_PORT			40040		/* WFA wlan receive port */
92
93/* WPS UPNP definitions */
94#define UPNP_WPS_TYPE_SSR		1		/* Set Selected Registrar */
95#define UPNP_WPS_TYPE_PMR		2		/* Wait For Put Message Resp */
96#define UPNP_WPS_TYPE_GDIR		3		/* Wait For Get DevInfo Resp */
97#define UPNP_WPS_TYPE_PWR		4		/* Put WLAN Response */
98#define UPNP_WPS_TYPE_WE		5		/* WLAN Event */
99#define UPNP_WPS_TYPE_QWFAS		6		/* Query WFAWLANConfig Subscribers */
100#define UPNP_WPS_TYPE_DISCONNECT	7		/* Subscriber unreachable */
101#define UPNP_WPS_TYPE_MAX		8
102
103typedef struct {
104	unsigned int type;
105	unsigned char dst_addr[16];
106	unsigned int length;
107	unsigned char data[1];
108} UPNP_WPS_CMD;
109
110#define UPNP_WPS_CMD_SIZE		24
111
112/*
113 * WPS module
114 */
115#define WPS_EAP_ADDR			"127.0.0.1"
116#define WPS_UPNPDEV_ADDR		"127.0.0.1"
117
118#define WPS_UPNPDEV_PORT		40000
119
120#endif	/* __SECURITY_IPC_H__ */
121