1 /* MiniDLNA media server
2 * Copyright (C) 2013-2017 NETGEAR
4 * This file is part of MiniDLNA.
6 * MiniDLNA is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
10 * MiniDLNA is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with MiniDLNA. If not, see <http://www.gnu.org/licenses/>.
22 #include <netinet/in.h>
24 #define CLIENT_CACHE_SLOTS 25
26 /* Client capability/quirk flags */
27 #define FLAG_DLNA 0x00000001
28 #define FLAG_MIME_AVI_DIVX 0x00000002
29 #define FLAG_MIME_AVI_AVI 0x00000004
30 #define FLAG_MIME_FLAC_FLAC 0x00000008
31 #define FLAG_MIME_WAV_WAV 0x00000010
32 #define FLAG_RESIZE_THUMBS 0x00000020
33 #define FLAG_NO_RESIZE 0x00000040
34 #define FLAG_MS_PFS 0x00000080 /* Microsoft PlaysForSure client */
35 #define FLAG_SAMSUNG 0x00000100
36 #define FLAG_SAMSUNG_DCM10 0x00000200
37 #define FLAG_AUDIO_ONLY 0x00000400
38 #define FLAG_FORCE_SORT 0x00000800
39 #define FLAG_CAPTION_RES 0x00001000
40 #define FLAG_SKIP_DLNA_PN 0x00002000 /* during browsing */
41 #define FLAG_CONVERT_MS 0x00004000 /* convert ms to s */
42 /* Response-related flags */
43 #define FLAG_HAS_CAPTIONS 0x10000000
44 #define RESPONSE_TRUNCATED 0x80000000
45 #define RESPONSE_FLAGS 0xF0000000
85 ENetFrontLivingConnect
,
92 struct client_type_s
{
93 enum client_types type
;
97 enum match_types match_type
;
100 struct client_cache_s
{
102 unsigned char mac
[6];
103 struct client_type_s
*type
;
108 extern struct client_type_s client_types
[];
109 extern struct client_cache_s clients
[CLIENT_CACHE_SLOTS
];
111 struct client_cache_s
*SearchClientCache(struct in_addr addr
, int quiet
);
112 struct client_cache_s
*AddClientCache(struct in_addr addr
, int type
);