winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
April
March
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-devel
August 2021
----- 2025 -----
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-devel@winehq.org
78 participants
929 discussions
Start a n
N
ew thread
[PATCH v2] hid: Validate preparsed data pointer passed in HidP functions.
by Rémi Bernon
10 Aug '21
10 Aug '21
From: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Power Rangers: Battle for the Grid. 0514:trace:hidp:HidP_GetCaps preparsed_data 000000004C9566B0, caps 000000000010EF00. 0514:trace:hidp:HidP_GetCaps preparsed_data 0000000000000000, caps 000000000010F020. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> --- dlls/hid/hidp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff
…
[View More]
--git a/dlls/hid/hidp.c b/dlls/hid/hidp.c index 6259e0f56a9..37715ccfbca 100644 --- a/dlls/hid/hidp.c +++ b/dlls/hid/hidp.c @@ -39,7 +39,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(hidp); static NTSTATUS get_value_caps_range( WINE_HIDP_PREPARSED_DATA *preparsed, HIDP_REPORT_TYPE report_type, ULONG report_len, const struct hid_value_caps **caps, const struct hid_value_caps **caps_end ) { - if (preparsed->magic != HID_MAGIC) return HIDP_STATUS_INVALID_PREPARSED_DATA; + if (!preparsed || preparsed->magic != HID_MAGIC) return HIDP_STATUS_INVALID_PREPARSED_DATA; switch (report_type) { @@ -167,7 +167,7 @@ NTSTATUS WINAPI HidP_GetCaps( PHIDP_PREPARSED_DATA preparsed_data, HIDP_CAPS *ca TRACE( "preparsed_data %p, caps %p.\n", preparsed_data, caps ); - if (preparsed->magic != HID_MAGIC) return HIDP_STATUS_INVALID_PREPARSED_DATA; + if (!preparsed || preparsed->magic != HID_MAGIC) return HIDP_STATUS_INVALID_PREPARSED_DATA; *caps = preparsed->caps; return HIDP_STATUS_SUCCESS; @@ -787,7 +787,7 @@ NTSTATUS WINAPI HidP_GetLinkCollectionNodes( HIDP_LINK_COLLECTION_NODE *nodes, U TRACE( "nodes %p, nodes_len %p, preparsed_data %p.\n", nodes, nodes_len, preparsed_data ); - if (preparsed->magic != HID_MAGIC) return HIDP_STATUS_INVALID_PREPARSED_DATA; + if (!preparsed || preparsed->magic != HID_MAGIC) return HIDP_STATUS_INVALID_PREPARSED_DATA; count = *nodes_len = preparsed->caps.NumberLinkCollectionNodes; if (capacity < count) return HIDP_STATUS_BUFFER_TOO_SMALL; -- 2.32.0
[View Less]
1
1
0
0
[PATCH 1/6] hid: Validate preparsed data pointer passed in HidP functions.
by Rémi Bernon
10 Aug '21
10 Aug '21
From: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Power Rangers: Battle for the Grid. 0514:trace:hidp:HidP_GetCaps preparsed_data 000000004C9566B0, caps 000000000010EF00. 0514:trace:hidp:HidP_GetCaps preparsed_data 0000000000000000, caps 000000000010F020. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> --- dlls/hid/hidp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff
…
[View More]
--git a/dlls/hid/hidp.c b/dlls/hid/hidp.c index 6259e0f56a9..37715ccfbca 100644 --- a/dlls/hid/hidp.c +++ b/dlls/hid/hidp.c @@ -39,7 +39,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(hidp); static NTSTATUS get_value_caps_range( WINE_HIDP_PREPARSED_DATA *preparsed, HIDP_REPORT_TYPE report_type, ULONG report_len, const struct hid_value_caps **caps, const struct hid_value_caps **caps_end ) { - if (preparsed->magic != HID_MAGIC) return HIDP_STATUS_INVALID_PREPARSED_DATA; + if (!preparsed || preparsed->magic != HID_MAGIC) return HIDP_STATUS_INVALID_PREPARSED_DATA; switch (report_type) { @@ -167,7 +167,7 @@ NTSTATUS WINAPI HidP_GetCaps( PHIDP_PREPARSED_DATA preparsed_data, HIDP_CAPS *ca TRACE( "preparsed_data %p, caps %p.\n", preparsed_data, caps ); - if (preparsed->magic != HID_MAGIC) return HIDP_STATUS_INVALID_PREPARSED_DATA; + if (!preparsed || preparsed->magic != HID_MAGIC) return HIDP_STATUS_INVALID_PREPARSED_DATA; *caps = preparsed->caps; return HIDP_STATUS_SUCCESS; @@ -787,7 +787,7 @@ NTSTATUS WINAPI HidP_GetLinkCollectionNodes( HIDP_LINK_COLLECTION_NODE *nodes, U TRACE( "nodes %p, nodes_len %p, preparsed_data %p.\n", nodes, nodes_len, preparsed_data ); - if (preparsed->magic != HID_MAGIC) return HIDP_STATUS_INVALID_PREPARSED_DATA; + if (!preparsed || preparsed->magic != HID_MAGIC) return HIDP_STATUS_INVALID_PREPARSED_DATA; count = *nodes_len = preparsed->caps.NumberLinkCollectionNodes; if (capacity < count) return HIDP_STATUS_BUFFER_TOO_SMALL; -- 2.32.0
[View Less]
1
5
0
0
[PATCH] hid: Validate pointer passed into GetCaps
by Alistair Leslie-Hughes
10 Aug '21
10 Aug '21
Power Rangers: Battle for the Grid. 0514:trace:hidp:HidP_GetCaps preparsed_data 000000004C9566B0, caps 000000000010EF00. 0514:trace:hidp:HidP_GetCaps preparsed_data 0000000000000000, caps 000000000010F020. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> --- dlls/hid/hidp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/hid/hidp.c b/dlls/hid/hidp.c index 6259e0f56a9..c3a99f0b9d5 100644 --- a/dlls/hid/hidp.c +++ b/dlls/hid/hidp.c @@ -167,7 +
…
[View More]
167,7 @@ NTSTATUS WINAPI HidP_GetCaps( PHIDP_PREPARSED_DATA preparsed_data, HIDP_CAPS *ca TRACE( "preparsed_data %p, caps %p.\n", preparsed_data, caps ); - if (preparsed->magic != HID_MAGIC) return HIDP_STATUS_INVALID_PREPARSED_DATA; + if (!preparsed || preparsed->magic != HID_MAGIC) return HIDP_STATUS_INVALID_PREPARSED_DATA; *caps = preparsed->caps; return HIDP_STATUS_SUCCESS; -- 2.30.2
[View Less]
2
1
0
0
[PATCH 4/4] iphlpapi: Implement AllocateAndGetIpNetTableFromStack() on top of GetIpNetTable().
by Huw Davies
10 Aug '21
10 Aug '21
Signed-off-by: Huw Davies <huw(a)codeweavers.com> --- dlls/iphlpapi/iphlpapi_main.c | 23 ++++ dlls/iphlpapi/ipstats.c | 193 ---------------------------------- 2 files changed, 23 insertions(+), 193 deletions(-) diff --git a/dlls/iphlpapi/iphlpapi_main.c b/dlls/iphlpapi/iphlpapi_main.c index 24cfedd2b02..fe2daa0f24d 100644 --- a/dlls/iphlpapi/iphlpapi_main.c +++ b/dlls/iphlpapi/iphlpapi_main.c @@ -2317,6 +2317,29 @@ err: return err; } +/***********************************
…
[View More]
******************************* + * AllocateAndGetIpNetTableFromStack (IPHLPAPI.@) + */ +DWORD WINAPI AllocateAndGetIpNetTableFromStack( MIB_IPNETTABLE **table, BOOL sort, HANDLE heap, DWORD flags ) +{ + DWORD err, size = FIELD_OFFSET(MIB_IPNETTABLE, table[2]), attempt; + + TRACE( "table %p, sort %d, heap %p, flags 0x%08x\n", table, sort, heap, flags ); + + for (attempt = 0; attempt < 5; attempt++) + { + *table = HeapAlloc( heap, flags, size ); + if (!*table) return ERROR_NOT_ENOUGH_MEMORY; + + err = GetIpNetTable( *table, &size, sort ); + if (!err) break; + HeapFree( heap, flags, *table ); + if (err != ERROR_INSUFFICIENT_BUFFER) break; + } + + return err; +} + static void ipnet_row2_fill( MIB_IPNET_ROW2 *row, USHORT fam, void *key, struct nsi_ip_neighbour_rw *rw, struct nsi_ip_neighbour_dynamic *dyn ) { diff --git a/dlls/iphlpapi/ipstats.c b/dlls/iphlpapi/ipstats.c index 7bb4ff0603e..115bafa6f8e 100644 --- a/dlls/iphlpapi/ipstats.c +++ b/dlls/iphlpapi/ipstats.c @@ -1220,199 +1220,6 @@ static void *append_table_row( HANDLE heap, DWORD flags, void *table, DWORD *tab return table; } -static int compare_ipnet_rows(const void *a, const void *b) -{ - const MIB_IPNETROW *rowA = a; - const MIB_IPNETROW *rowB = b; - - return ntohl(rowA->dwAddr) - ntohl(rowB->dwAddr); -} - - -/****************************************************************** - * AllocateAndGetIpNetTableFromStack (IPHLPAPI.@) - * - * Get the IP-to-physical address mapping table. - * Like GetIpNetTable(), but allocate the returned table from heap. - * - * PARAMS - * ppIpNetTable [Out] pointer into which the MIB_IPNETTABLE is - * allocated and returned. - * bOrder [In] whether to sort the table - * heap [In] heap from which the table is allocated - * flags [In] flags to HeapAlloc - * - * RETURNS - * ERROR_INVALID_PARAMETER if ppIpNetTable is NULL, other error codes - * on failure, NO_ERROR on success. - */ -DWORD WINAPI AllocateAndGetIpNetTableFromStack(PMIB_IPNETTABLE *ppIpNetTable, BOOL bOrder, - HANDLE heap, DWORD flags) -{ - MIB_IPNETTABLE *table; - MIB_IPNETROW row; - DWORD ret = NO_ERROR, count = 16, table_size = FIELD_OFFSET( MIB_IPNETTABLE, table[count] ); - - TRACE("table %p, bOrder %d, heap %p, flags 0x%08x\n", ppIpNetTable, bOrder, heap, flags); - - if (!ppIpNetTable) return ERROR_INVALID_PARAMETER; - - if (!(table = HeapAlloc( heap, flags, table_size ))) - return ERROR_OUTOFMEMORY; - - table->dwNumEntries = 0; - -#ifdef __linux__ - { - FILE *fp; - - if ((fp = fopen("/proc/net/arp", "r"))) - { - char buf[512], *ptr; - DWORD atf_flags; - - /* skip header line */ - ptr = fgets(buf, sizeof(buf), fp); - while ((ptr = fgets(buf, sizeof(buf), fp))) - { - memset( &row, 0, sizeof(row) ); - - row.dwAddr = inet_addr(ptr); - while (*ptr && !isspace(*ptr)) ptr++; - strtoul(ptr + 1, &ptr, 16); /* hw type (skip) */ - atf_flags = strtoul(ptr + 1, &ptr, 16); - -#ifdef ATF_COM - if (atf_flags & ATF_COM) row.u.Type = MIB_IPNET_TYPE_DYNAMIC; - else -#endif -#ifdef ATF_PERM - if (atf_flags & ATF_PERM) row.u.Type = MIB_IPNET_TYPE_STATIC; - else -#endif - row.u.Type = MIB_IPNET_TYPE_OTHER; - - while (*ptr && isspace(*ptr)) ptr++; - while (*ptr && !isspace(*ptr)) - { - row.bPhysAddr[row.dwPhysAddrLen++] = strtoul(ptr, &ptr, 16); - if (*ptr) ptr++; - } - while (*ptr && isspace(*ptr)) ptr++; - while (*ptr && !isspace(*ptr)) ptr++; /* mask (skip) */ - while (*ptr && isspace(*ptr)) ptr++; - getInterfaceIndexByName(ptr, &row.dwIndex); - - if (!(table = append_table_row( heap, flags, table, &table_size, &count, &row, sizeof(row) ))) - break; - } - fclose(fp); - } - else ret = ERROR_NOT_SUPPORTED; - } -#elif defined(HAVE_SYS_TIHDR_H) && defined(T_OPTMGMT_ACK) - { - void *data; - int fd, len, namelen; - mib2_ipNetToMediaEntry_t *entry; - char name[64]; - - if ((fd = open_streams_mib( NULL )) != -1) - { - if ((data = read_mib_entry( fd, MIB2_IP, MIB2_IP_MEDIA, &len ))) - { - for (entry = data; (char *)(entry + 1) <= (char *)data + len; entry++) - { - row.dwPhysAddrLen = min( entry->ipNetToMediaPhysAddress.o_length, MAXLEN_PHYSADDR ); - memcpy( row.bPhysAddr, entry->ipNetToMediaPhysAddress.o_bytes, row.dwPhysAddrLen ); - row.dwAddr = entry->ipNetToMediaNetAddress; - row.u.Type = entry->ipNetToMediaType; - namelen = min( sizeof(name) - 1, entry->ipNetToMediaIfIndex.o_length ); - memcpy( name, entry->ipNetToMediaIfIndex.o_bytes, namelen ); - name[namelen] = 0; - getInterfaceIndexByName( name, &row.dwIndex ); - if (!(table = append_table_row( heap, flags, table, &table_size, &count, &row, sizeof(row) ))) - break; - } - HeapFree( GetProcessHeap(), 0, data ); - } - close( fd ); - } - else ret = ERROR_NOT_SUPPORTED; - } -#elif defined(HAVE_SYS_SYSCTL_H) && defined(NET_RT_DUMP) - { - int mib[] = {CTL_NET, PF_ROUTE, 0, AF_INET, NET_RT_FLAGS, RTF_LLINFO}; - size_t needed; - char *buf = NULL, *lim, *next; - struct rt_msghdr *rtm; - struct sockaddr_inarp *sinarp; - struct sockaddr_dl *sdl; - - if (sysctl (mib, ARRAY_SIZE(mib), NULL, &needed, NULL, 0) == -1) - { - ERR ("failed to get arp table\n"); - ret = ERROR_NOT_SUPPORTED; - goto done; - } - - buf = HeapAlloc (GetProcessHeap (), 0, needed); - if (!buf) - { - ret = ERROR_OUTOFMEMORY; - goto done; - } - - if (sysctl (mib, ARRAY_SIZE(mib), buf, &needed, NULL, 0) == -1) - { - ret = ERROR_NOT_SUPPORTED; - goto done; - } - - lim = buf + needed; - next = buf; - while(next < lim) - { - rtm = (struct rt_msghdr *)next; - sinarp=(struct sockaddr_inarp *)(rtm + 1); - sdl = (struct sockaddr_dl *)((char *)sinarp + ROUNDUP(sinarp->sin_len)); - if(sdl->sdl_alen) /* arp entry */ - { - memset( &row, 0, sizeof(row) ); - row.dwAddr = sinarp->sin_addr.s_addr; - row.dwIndex = sdl->sdl_index; - row.dwPhysAddrLen = min( 8, sdl->sdl_alen ); - memcpy( row.bPhysAddr, &sdl->sdl_data[sdl->sdl_nlen], row.dwPhysAddrLen ); - if(rtm->rtm_rmx.rmx_expire == 0) row.u.Type = MIB_IPNET_TYPE_STATIC; - else if(sinarp->sin_other & SIN_PROXY) row.u.Type = MIB_IPNET_TYPE_OTHER; - else if(rtm->rtm_rmx.rmx_expire != 0) row.u.Type = MIB_IPNET_TYPE_DYNAMIC; - else row.u.Type = MIB_IPNET_TYPE_INVALID; - - if (!(table = append_table_row( heap, flags, table, &table_size, &count, &row, sizeof(row) ))) - break; - } - next += rtm->rtm_msglen; - } -done: - HeapFree( GetProcessHeap (), 0, buf ); - } -#else - FIXME( "not implemented\n" ); - ret = ERROR_NOT_SUPPORTED; -#endif - - if (!table) return ERROR_OUTOFMEMORY; - if (!ret) - { - if (bOrder && table->dwNumEntries) - qsort( table->table, table->dwNumEntries, sizeof(row), compare_ipnet_rows ); - *ppIpNetTable = table; - } - else HeapFree( heap, flags, table ); - TRACE( "returning ret %u table %p\n", ret, table ); - return ret; -} - static DWORD get_tcp_table_sizes( TCP_TABLE_CLASS class, DWORD row_count, DWORD *row_size ) { DWORD table_size; -- 2.23.0
[View Less]
1
0
0
0
[PATCH 3/4] iphlpapi: Implement GetIpNetTable() on top of nsi.
by Huw Davies
10 Aug '21
10 Aug '21
Signed-off-by: Huw Davies <huw(a)codeweavers.com> --- dlls/iphlpapi/iphlpapi_main.c | 93 +++++++++++++++++++++++++---------- 1 file changed, 67 insertions(+), 26 deletions(-) diff --git a/dlls/iphlpapi/iphlpapi_main.c b/dlls/iphlpapi/iphlpapi_main.c index 6a9fb3d0914..24cfedd2b02 100644 --- a/dlls/iphlpapi/iphlpapi_main.c +++ b/dlls/iphlpapi/iphlpapi_main.c @@ -2230,50 +2230,91 @@ err: return err; } +static int ipnetrow_cmp( const void *a, const void *b ) +{ + const
…
[View More]
MIB_IPNETROW *row_a = a; + const MIB_IPNETROW *row_b = b; + + return RtlUlongByteSwap( row_a->dwAddr ) - RtlUlongByteSwap( row_b->dwAddr ); +} + /****************************************************************** * GetIpNetTable (IPHLPAPI.@) * * Get the IP-to-physical address mapping table. * * PARAMS - * pIpNetTable [Out] buffer for mapping table - * pdwSize [In/Out] length of output buffer - * bOrder [In] whether to sort the table + * table [Out] buffer for mapping table + * size [In/Out] length of output buffer + * sort [In] whether to sort the table * * RETURNS * Success: NO_ERROR * Failure: error code from winerror.h * - * NOTES - * If pdwSize is less than required, the function will return - * ERROR_INSUFFICIENT_BUFFER, and *pdwSize will be set to the required byte - * size. - * If bOrder is true, the returned table will be sorted by IP address. */ -DWORD WINAPI GetIpNetTable(PMIB_IPNETTABLE pIpNetTable, PULONG pdwSize, BOOL bOrder) +DWORD WINAPI GetIpNetTable( MIB_IPNETTABLE *table, ULONG *size, BOOL sort ) { - DWORD ret; - PMIB_IPNETTABLE table; + DWORD err, count, needed, i; + struct nsi_ipv4_neighbour_key *keys; + struct nsi_ip_neighbour_rw *rw; + struct nsi_ip_neighbour_dynamic *dyn; - TRACE("pIpNetTable %p, pdwSize %p, bOrder %d\n", pIpNetTable, pdwSize, bOrder); + TRACE( "table %p, size %p, sort %d\n", table, size, sort ); - if (!pdwSize) return ERROR_INVALID_PARAMETER; + if (!size) return ERROR_INVALID_PARAMETER; - ret = AllocateAndGetIpNetTableFromStack( &table, bOrder, GetProcessHeap(), 0 ); - if (!ret) { - DWORD size = FIELD_OFFSET( MIB_IPNETTABLE, table[table->dwNumEntries] ); - if (!pIpNetTable || *pdwSize < size) { - *pdwSize = size; - ret = ERROR_INSUFFICIENT_BUFFER; - } - else { - *pdwSize = size; - memcpy(pIpNetTable, table, size); + err = NsiAllocateAndGetTable( 1, &NPI_MS_IPV4_MODULEID, NSI_IP_NEIGHBOUR_TABLE, (void **)&keys, sizeof(*keys), + (void **)&rw, sizeof(*rw), (void **)&dyn, sizeof(*dyn), + NULL, 0, &count, 0 ); + if (err) return err; + + needed = FIELD_OFFSET( MIB_IPNETTABLE, table[count] ); + + if (!table || *size < needed) + { + *size = needed; + err = ERROR_INSUFFICIENT_BUFFER; + goto err; + } + + table->dwNumEntries = count; + for (i = 0; i < count; i++) + { + MIB_IPNETROW *row = table->table + i; + + ConvertInterfaceLuidToIndex( &keys[i].luid, &row->dwIndex ); + row->dwPhysAddrLen = dyn[i].phys_addr_len; + if (row->dwPhysAddrLen > sizeof(row->bPhysAddr)) row->dwPhysAddrLen = 0; + memcpy( row->bPhysAddr, rw[i].phys_addr, row->dwPhysAddrLen ); + memset( row->bPhysAddr + row->dwPhysAddrLen, 0, + sizeof(row->bPhysAddr) - row->dwPhysAddrLen ); + row->dwAddr = keys[i].addr.WS_s_addr; + switch (dyn->state) + { + case NlnsUnreachable: + case NlnsIncomplete: + row->u.Type = MIB_IPNET_TYPE_INVALID; + break; + case NlnsProbe: + case NlnsDelay: + case NlnsStale: + case NlnsReachable: + row->u.Type = MIB_IPNET_TYPE_DYNAMIC; + break; + case NlnsPermanent: + row->u.Type = MIB_IPNET_TYPE_STATIC; + break; + default: + row->u.Type = MIB_IPNET_TYPE_OTHER; } - HeapFree(GetProcessHeap(), 0, table); } - TRACE("returning %d\n", ret); - return ret; + + if (sort) qsort( table->table, table->dwNumEntries, sizeof(*table->table), ipnetrow_cmp ); + +err: + NsiFreeTable( keys, rw, dyn, NULL ); + return err; } static void ipnet_row2_fill( MIB_IPNET_ROW2 *row, USHORT fam, void *key, struct nsi_ip_neighbour_rw *rw, -- 2.23.0
[View Less]
1
0
0
0
[PATCH 2/4] iphlpapi: Implement GetIpNetTable2() on top of nsi.
by Huw Davies
10 Aug '21
10 Aug '21
Signed-off-by: Huw Davies <huw(a)codeweavers.com> --- dlls/iphlpapi/iphlpapi_main.c | 107 ++++++++++++++++++++++++++++++---- dlls/nsi/tests/nsi.c | 2 - 2 files changed, 96 insertions(+), 13 deletions(-) diff --git a/dlls/iphlpapi/iphlpapi_main.c b/dlls/iphlpapi/iphlpapi_main.c index 2700ecd3172..6a9fb3d0914 100644 --- a/dlls/iphlpapi/iphlpapi_main.c +++ b/dlls/iphlpapi/iphlpapi_main.c @@ -2276,6 +2276,102 @@ DWORD WINAPI GetIpNetTable(PMIB_IPNETTABLE pIpNetTable, PULONG
…
[View More]
pdwSize, BOOL bOr return ret; } +static void ipnet_row2_fill( MIB_IPNET_ROW2 *row, USHORT fam, void *key, struct nsi_ip_neighbour_rw *rw, + struct nsi_ip_neighbour_dynamic *dyn ) +{ + struct nsi_ipv4_neighbour_key *key4 = (struct nsi_ipv4_neighbour_key *)key; + struct nsi_ipv6_neighbour_key *key6 = (struct nsi_ipv6_neighbour_key *)key; + + if (fam == WS_AF_INET) + { + row->Address.Ipv4.sin_family = fam; + row->Address.Ipv4.sin_port = 0; + row->Address.Ipv4.sin_addr = key4->addr; + memset( &row->Address.Ipv4.sin_zero, 0, sizeof(row->Address.Ipv4.sin_zero) ); + row->InterfaceLuid = key4->luid; + } + else + { + row->Address.Ipv6.sin6_family = fam; + row->Address.Ipv6.sin6_port = 0; + row->Address.Ipv6.sin6_flowinfo = 0; + row->Address.Ipv6.sin6_addr = key6->addr; + row->Address.Ipv6.sin6_scope_id = 0; + row->InterfaceLuid = key6->luid; + } + + ConvertInterfaceLuidToIndex( &row->InterfaceLuid, &row->InterfaceIndex ); + + row->PhysicalAddressLength = dyn->phys_addr_len; + if (row->PhysicalAddressLength > sizeof(row->PhysicalAddress)) + row->PhysicalAddressLength = 0; + memcpy( row->PhysicalAddress, rw->phys_addr, row->PhysicalAddressLength ); + memset( row->PhysicalAddress + row->PhysicalAddressLength, 0, + sizeof(row->PhysicalAddress) - row->PhysicalAddressLength ); + row->State = dyn->state; + row->u.Flags = 0; + row->u.s.IsRouter = dyn->flags.is_router; + row->u.s.IsUnreachable = dyn->flags.is_unreachable; + row->ReachabilityTime.LastReachable = dyn->time; +} + +/****************************************************************** + * GetIpNetTable2 (IPHLPAPI.@) + */ +DWORD WINAPI GetIpNetTable2( ADDRESS_FAMILY family, MIB_IPNET_TABLE2 **table ) +{ + void *key[2] = { NULL, NULL }; + struct nsi_ip_neighbour_rw *rw[2] = { NULL, NULL }; + struct nsi_ip_neighbour_dynamic *dyn[2] = { NULL, NULL }; + static const USHORT fam[2] = { WS_AF_INET, WS_AF_INET6 }; + static const DWORD key_size[2] = { sizeof(struct nsi_ipv4_neighbour_key), sizeof(struct nsi_ipv6_neighbour_key) }; + DWORD err = ERROR_SUCCESS, i, size, count[2] = { 0, 0 }; + + TRACE( "%u, %p\n", family, table ); + + if (!table || (family != WS_AF_INET && family != WS_AF_INET6 && family != WS_AF_UNSPEC)) + return ERROR_INVALID_PARAMETER; + + for (i = 0; i < 2; i++) + { + if (family != WS_AF_UNSPEC && family != fam[i]) continue; + + err = NsiAllocateAndGetTable( 1, ip_module_id( fam[i] ), NSI_IP_NEIGHBOUR_TABLE, key + i, key_size[i], + (void **)rw + i, sizeof(**rw), (void **)dyn + i, sizeof(**dyn), + NULL, 0, count + i, 0 ); + if (err) count[i] = 0; + } + + size = FIELD_OFFSET(MIB_IPNET_TABLE2, Table[ count[0] + count[1] ]); + *table = heap_alloc( size ); + if (!*table) + { + err = ERROR_NOT_ENOUGH_MEMORY; + goto err; + } + + (*table)->NumEntries = count[0] + count[1]; + for (i = 0; i < count[0]; i++) + { + MIB_IPNET_ROW2 *row = (*table)->Table + i; + struct nsi_ipv4_neighbour_key *key4 = (struct nsi_ipv4_neighbour_key *)key[0]; + + ipnet_row2_fill( row, fam[0], key4 + i, rw[0] + i, dyn[0] + i ); + } + + for (i = 0; i < count[1]; i++) + { + MIB_IPNET_ROW2 *row = (*table)->Table + count[0] + i; + struct nsi_ipv6_neighbour_key *key6 = (struct nsi_ipv6_neighbour_key *)key[1]; + + ipnet_row2_fill( row, fam[1], key6 + i, rw[1] + i, dyn[1] + i ); + } + +err: + for (i = 0; i < 2; i++) NsiFreeTable( key[i], rw[i], dyn[i], NULL ); + return err; +} + /* Gets the DNS server list into the list beginning at list. Assumes that * a single server address may be placed at list if *len is at least * sizeof(IP_ADDR_STRING) long. Otherwise, list->Next is set to firstDynamic, @@ -3559,17 +3655,6 @@ char *WINAPI IPHLP_if_indextoname( NET_IFINDEX index, char *name ) return name; } -/****************************************************************** - * GetIpNetTable2 (IPHLPAPI.@) - */ -DWORD WINAPI GetIpNetTable2(ADDRESS_FAMILY family, PMIB_IPNET_TABLE2 *table) -{ - static int once; - - if (!once++) FIXME("(%u %p): stub\n", family, table); - return ERROR_NOT_SUPPORTED; -} - /****************************************************************** * GetIpInterfaceTable (IPHLPAPI.@) */ diff --git a/dlls/nsi/tests/nsi.c b/dlls/nsi/tests/nsi.c index 7acb7a497fb..f2a247d3333 100644 --- a/dlls/nsi/tests/nsi.c +++ b/dlls/nsi/tests/nsi.c @@ -508,9 +508,7 @@ todo_wine_if( family == AF_INET6 ) if (err) goto err; err = GetIpNetTable2( family, &table ); -todo_wine ok( !err, "got %x\n", err ); - if (err) goto err; err = NsiAllocateAndGetTable( 1, mod, NSI_IP_NEIGHBOUR_TABLE, (void **)&key_tbl_2, key_size, NULL, 0, (void **)&dyn_tbl_2, sizeof(*dyn), -- 2.23.0
[View Less]
1
0
0
0
[PATCH 1/4] nsiproxy: Implement IPv4 neighbour enumerate_all.
by Huw Davies
10 Aug '21
10 Aug '21
Signed-off-by: Huw Davies <huw(a)codeweavers.com> --- dlls/nsi/tests/nsi.c | 78 +++++++++++++++ dlls/nsiproxy.sys/ip.c | 219 +++++++++++++++++++++++++++++++++++++++++ include/netioapi.h | 2 + include/wine/nsi.h | 34 +++++++ 4 files changed, 333 insertions(+) diff --git a/dlls/nsi/tests/nsi.c b/dlls/nsi/tests/nsi.c index 9d12530cb27..7acb7a497fb 100644 --- a/dlls/nsi/tests/nsi.c +++ b/dlls/nsi/tests/nsi.c @@ -485,6 +485,82 @@ static void test_ip_unicast( int family )
…
[View More]
winetest_pop_context(); } +static void test_ip_neighbour( int family ) +{ + const NPI_MODULEID *mod = (family == AF_INET) ? &NPI_MS_IPV4_MODULEID : &NPI_MS_IPV6_MODULEID; + DWORD err, i, count, count2, attempt; + struct nsi_ipv4_neighbour_key *key_tbl, *key_tbl_2, *key4; + struct nsi_ipv6_neighbour_key *key6; + struct nsi_ip_neighbour_rw *rw_tbl, *rw; + struct nsi_ip_neighbour_dynamic *dyn_tbl, *dyn_tbl_2, *dyn; + MIB_IPNET_TABLE2 *table; + DWORD key_size = (family == AF_INET) ? sizeof(struct nsi_ipv4_neighbour_key) : sizeof(struct nsi_ipv6_neighbour_key); + + winetest_push_context( family == AF_INET ? "AF_INET" : "AF_INET6" ); + + for (attempt = 0; attempt < 5; attempt++) + { + err = NsiAllocateAndGetTable( 1, mod, NSI_IP_NEIGHBOUR_TABLE, (void **)&key_tbl, key_size, + (void **)&rw_tbl, sizeof(*rw), (void **)&dyn_tbl, sizeof(*dyn), + NULL, 0, &count, 0 ); +todo_wine_if( family == AF_INET6 ) + ok( !err, "got %x\n", err ); + if (err) goto err; + + err = GetIpNetTable2( family, &table ); +todo_wine + ok( !err, "got %x\n", err ); + if (err) goto err; + + err = NsiAllocateAndGetTable( 1, mod, NSI_IP_NEIGHBOUR_TABLE, (void **)&key_tbl_2, key_size, + NULL, 0, (void **)&dyn_tbl_2, sizeof(*dyn), + NULL, 0, &count2, 0 ); + ok( !err, "got %x\n", err ); + if (count == count2 && !memcmp( dyn_tbl, dyn_tbl_2, count * sizeof(*dyn) )) break; + NsiFreeTable( key_tbl_2, NULL, dyn_tbl_2, NULL ); + NsiFreeTable( key_tbl, rw_tbl, dyn_tbl, NULL ); + } + + ok( count == table->NumEntries, "%d vs %d\n", count, table->NumEntries ); + + for (i = 0; i < count; i++) + { + MIB_IPNET_ROW2 *row = table->Table + i; + rw = rw_tbl + i; + dyn = dyn_tbl + i; + + if (family == AF_INET) + { + key4 = key_tbl + i; + ok( key4->addr.s_addr == row->Address.Ipv4.sin_addr.s_addr, "%08x vs %08x\n", key4->addr.s_addr, + row->Address.Ipv4.sin_addr.s_addr ); + ok( key4->luid.Value == row->InterfaceLuid.Value, "%s vs %s\n", wine_dbgstr_longlong( key4->luid.Value ), + wine_dbgstr_longlong( row->InterfaceLuid.Value ) ); + ok( key4->luid2.Value == row->InterfaceLuid.Value, "mismatch\n" ); + } + else if (family == AF_INET6) + { + key6 = (struct nsi_ipv6_neighbour_key *)key_tbl + i; + ok( !memcmp( key6->addr.s6_addr, row->Address.Ipv6.sin6_addr.s6_addr, sizeof(IN6_ADDR) ), "mismatch\n" ); + ok( key6->luid.Value == row->InterfaceLuid.Value, "mismatch\n" ); + ok( key6->luid2.Value == row->InterfaceLuid.Value, "mismatch\n" ); + } + + ok( dyn->phys_addr_len == row->PhysicalAddressLength, "mismatch\n" ); + ok( !memcmp( rw->phys_addr, row->PhysicalAddress, dyn->phys_addr_len ), "mismatch\n" ); + ok( dyn->state == row->State, "%x vs %x\n", dyn->state, row->State ); + ok( dyn->flags.is_router == row->IsRouter, "%x vs %x\n", dyn->flags.is_router, row->IsRouter ); + ok( dyn->flags.is_unreachable == row->IsUnreachable, "%x vs %x\n", dyn->flags.is_unreachable, row->IsUnreachable ); + ok( dyn->time == row->ReachabilityTime.LastReachable, "%x vs %x\n", dyn->time, row->ReachabilityTime.LastReachable ); + } + + NsiFreeTable( key_tbl_2, NULL, dyn_tbl_2, NULL ); + NsiFreeTable( key_tbl, rw_tbl, dyn_tbl, NULL ); + +err: + winetest_pop_context(); +} + static void test_ip_forward( int family ) { DWORD rw_sizes[] = { FIELD_OFFSET(struct nsi_ip_forward_rw, unk), @@ -606,6 +682,8 @@ START_TEST( nsi ) test_ip_unicast( AF_INET ); test_ip_unicast( AF_INET6 ); + test_ip_neighbour( AF_INET ); + test_ip_neighbour( AF_INET6 ); test_ip_forward( AF_INET ); test_ip_forward( AF_INET6 ); } diff --git a/dlls/nsiproxy.sys/ip.c b/dlls/nsiproxy.sys/ip.c index cb98c6a5206..9abb51ac678 100644 --- a/dlls/nsiproxy.sys/ip.c +++ b/dlls/nsiproxy.sys/ip.c @@ -41,10 +41,26 @@ #include <netinet/in.h> #endif +#ifdef HAVE_NETINET_IP_VAR_H +#include <netinet/ip_var.h> +#endif + +#ifdef HAVE_NETINET_IF_ETHER_H +#include <netinet/if_ether.h> +#endif + +#ifdef HAVE_NET_IF_DL_H +#include <net/if_dl.h> +#endif + #ifdef HAVE_IFADDRS_H #include <ifaddrs.h> #endif +#ifdef HAVE_ARPA_INET_H +#include <arpa/inet.h> +#endif + #include "ntstatus.h" #define WIN32_NO_STATUS #include "windef.h" @@ -234,6 +250,193 @@ static NTSTATUS ip_unicast_get_all_parameters( const void *key, DWORD key_size, return status; } +struct ipv4_neighbour_data +{ + NET_LUID luid; + DWORD if_index; + struct in_addr addr; + BYTE phys_addr[IF_MAX_PHYS_ADDRESS_LENGTH]; + DWORD state; + USHORT phys_addr_len; + BOOL is_router; + BOOL is_unreachable; +}; + +static void ipv4_neighbour_fill_entry( struct ipv4_neighbour_data *entry, struct nsi_ipv4_neighbour_key *key, struct nsi_ip_neighbour_rw *rw, + struct nsi_ip_neighbour_dynamic *dyn, void *stat ) +{ + USHORT phys_addr_len = entry->phys_addr_len > sizeof(rw->phys_addr) ? 0 : entry->phys_addr_len; + + if (key) + { + key->luid = entry->luid; + key->luid2 = entry->luid; + key->addr.WS_s_addr = entry->addr.s_addr; + key->pad = 0; + } + + if (rw) + { + memcpy( rw->phys_addr, entry->phys_addr, phys_addr_len ); + memset( rw->phys_addr + entry->phys_addr_len, 0, sizeof(rw->phys_addr) - phys_addr_len ); + } + + if (dyn) + { + memset( dyn, 0, sizeof(*dyn) ); + dyn->state = entry->state; + dyn->flags.is_router = entry->is_router; + dyn->flags.is_unreachable = entry->is_unreachable; + dyn->phys_addr_len = phys_addr_len; + } +} + +static NTSTATUS ipv4_neighbour_enumerate_all( void *key_data, DWORD key_size, void *rw_data, DWORD rw_size, + void *dynamic_data, DWORD dynamic_size, + void *static_data, DWORD static_size, DWORD_PTR *count ) +{ + DWORD num = 0; + NTSTATUS status = STATUS_SUCCESS; + BOOL want_data = key_size || rw_size || dynamic_size || static_size; + struct ipv4_neighbour_data entry; + + TRACE( "%p %d %p %d %p %d %p %d %p\n", key_data, key_size, rw_data, rw_size, + dynamic_data, dynamic_size, static_data, static_size, count ); + +#ifdef __linux__ + { + char buf[512], *ptr; + DWORD atf_flags; + FILE *fp; + + if (!(fp = fopen( "/proc/net/arp", "r" ))) return STATUS_NOT_SUPPORTED; + + /* skip header line */ + ptr = fgets( buf, sizeof(buf), fp ); + while ((ptr = fgets( buf, sizeof(buf), fp ))) + { + entry.addr.s_addr = inet_addr( ptr ); + while (*ptr && !isspace( *ptr )) ptr++; + strtoul( ptr + 1, &ptr, 16 ); /* hw type (skip) */ + atf_flags = strtoul( ptr + 1, &ptr, 16 ); + + if (atf_flags & ATF_PERM) entry.state = NlnsPermanent; + else if (atf_flags & ATF_COM) entry.state = NlnsReachable; + else entry.state = NlnsStale; + + entry.is_router = 0; + entry.is_unreachable = !(atf_flags & (ATF_PERM | ATF_COM)); + + while (*ptr && isspace( *ptr )) ptr++; + entry.phys_addr_len = 0; + while (*ptr && !isspace( *ptr )) + { + if (entry.phys_addr_len >= sizeof(entry.phys_addr)) + { + entry.phys_addr_len = 0; + while (*ptr && !isspace( *ptr )) ptr++; + break; + } + entry.phys_addr[entry.phys_addr_len++] = strtoul( ptr, &ptr, 16 ); + if (*ptr) ptr++; + } + while (*ptr && isspace( *ptr )) ptr++; + while (*ptr && !isspace( *ptr )) ptr++; /* mask (skip) */ + while (*ptr && isspace( *ptr )) ptr++; + + if (!convert_unix_name_to_luid( ptr, &entry.luid )) continue; + if (!convert_luid_to_index( &entry.luid, &entry.if_index )) continue; + + if (num < *count) + { + ipv4_neighbour_fill_entry( &entry, key_data, rw_data, dynamic_data, static_data ); + + if (key_data) key_data = (BYTE *)key_data + key_size; + if (rw_data) rw_data = (BYTE *)rw_data + rw_size; + if (dynamic_data) dynamic_data = (BYTE *)dynamic_data + dynamic_size; + if (static_data) static_data = (BYTE *)static_data + static_size; + } + num++; + } + fclose( fp ); + } +#elif defined(HAVE_SYS_SYSCTL_H) + { + int mib[] = { CTL_NET, PF_ROUTE, 0, AF_INET, NET_RT_FLAGS, RTF_LLINFO }, sinarp_len; + size_t needed; + char *buf = NULL, *lim, *next; + struct rt_msghdr *rtm; + struct sockaddr_inarp *sinarp; + struct sockaddr_dl *sdl; + + if (sysctl( mib, ARRAY_SIZE(mib), NULL, &needed, NULL, 0 ) == -1) return STATUS_NOT_SUPPORTED; + + buf = heap_alloc( needed ); + if (!buf) return STATUS_NO_MEMORY; + + if (sysctl( mib, ARRAY_SIZE(mib), buf, &needed, NULL, 0 ) == -1) + { + heap_free( buf ); + return STATUS_NOT_SUPPORTED; + } + + lim = buf + needed; + next = buf; + while (next < lim) + { + rtm = (struct rt_msghdr *)next; + sinarp = (struct sockaddr_inarp *)(rtm + 1); + if (sinarp->sin_len) sinarp_len = (sinarp->sin_len + sizeof(int)-1) & ~(sizeof(int)-1); + else sinarp_len = sizeof(int); + sdl = (struct sockaddr_dl *)((char *)sinarp + sinarp_len); + + if (sdl->sdl_alen) /* arp entry */ + { + entry.addr = sinarp->sin_addr; + entry.if_index = sdl->sdl_index; + if (!convert_index_to_luid( entry.if_index, &entry.luid )) break; + entry.phys_addr_len = min( 8, sdl->sdl_alen ); + if (entry.phys_addr_len > sizeof(entry.phys_addr)) entry.phys_addr_len = 0; + memcpy( entry.phys_addr, &sdl->sdl_data[sdl->sdl_nlen], entry.phys_addr_len ); + if (rtm->rtm_rmx.rmx_expire == 0) entry.state = NlnsPermanent; + else entry.state = NlnsReachable; + entry.is_router = sinarp->sin_other & SIN_ROUTER; + entry.is_unreachable = 0; /* FIXME */ + + if (num < *count) + { + ipv4_neighbour_fill_entry( &entry, key_data, rw_data, dynamic_data, static_data ); + + if (key_data) key_data = (BYTE *)key_data + key_size; + if (rw_data) rw_data = (BYTE *)rw_data + rw_size; + if (dynamic_data) dynamic_data = (BYTE *)dynamic_data + dynamic_size; + if (static_data) static_data = (BYTE *)static_data + static_size; + } + num++; + } + next += rtm->rtm_msglen; + } + heap_free( buf ); + } +#else + FIXME( "not implemented\n" ); + return STATUS_NOT_IMPLEMENTED; +#endif + + if (!want_data || num <= *count) *count = num; + else status = STATUS_MORE_ENTRIES; + + return status; +} + +static NTSTATUS ipv6_neighbour_enumerate_all( void *key_data, DWORD key_size, void *rw_data, DWORD rw_size, + void *dynamic_data, DWORD dynamic_size, + void *static_data, DWORD static_size, DWORD_PTR *count ) +{ + FIXME( "not implemented\n" ); + return STATUS_NOT_IMPLEMENTED; +} + struct ipv4_route_data { NET_LUID luid; @@ -489,6 +692,14 @@ static struct module_table ipv4_tables[] = ip_unicast_enumerate_all, ip_unicast_get_all_parameters, }, + { + NSI_IP_NEIGHBOUR_TABLE, + { + sizeof(struct nsi_ipv4_neighbour_key), sizeof(struct nsi_ip_neighbour_rw), + sizeof(struct nsi_ip_neighbour_dynamic), 0 + }, + ipv4_neighbour_enumerate_all, + }, { NSI_IP_FORWARD_TABLE, { @@ -519,6 +730,14 @@ static struct module_table ipv6_tables[] = ip_unicast_enumerate_all, ip_unicast_get_all_parameters, }, + { + NSI_IP_NEIGHBOUR_TABLE, + { + sizeof(struct nsi_ipv6_neighbour_key), sizeof(struct nsi_ip_neighbour_rw), + sizeof(struct nsi_ip_neighbour_dynamic), 0 + }, + ipv6_neighbour_enumerate_all, + }, { NSI_IP_FORWARD_TABLE, { diff --git a/include/netioapi.h b/include/netioapi.h index 44d877ae3c3..6005e58e216 100644 --- a/include/netioapi.h +++ b/include/netioapi.h @@ -257,6 +257,8 @@ DWORD WINAPI GetIfTable2Ex(MIB_IF_TABLE_LEVEL,MIB_IF_TABLE2**); DWORD WINAPI GetIpForwardEntry2(MIB_IPFORWARD_ROW2*); DWORD WINAPI GetIpForwardTable2(ADDRESS_FAMILY,MIB_IPFORWARD_TABLE2**); DWORD WINAPI GetIpInterfaceTable(ADDRESS_FAMILY,MIB_IPINTERFACE_TABLE**); +DWORD WINAPI GetIpNetEntry2(MIB_IPNET_ROW2*); +DWORD WINAPI GetIpNetTable2(ADDRESS_FAMILY,MIB_IPNET_TABLE2**); DWORD WINAPI GetUnicastIpAddressEntry(MIB_UNICASTIPADDRESS_ROW*); DWORD WINAPI GetUnicastIpAddressTable(ADDRESS_FAMILY,MIB_UNICASTIPADDRESS_TABLE**); PCHAR WINAPI if_indextoname(NET_IFINDEX,PCHAR); diff --git a/include/wine/nsi.h b/include/wine/nsi.h index dd18c7c7511..437582ad692 100644 --- a/include/wine/nsi.h +++ b/include/wine/nsi.h @@ -98,6 +98,7 @@ struct nsi_ndis_ifinfo_static /* Undocumented NSI IP tables */ #define NSI_IP_UNICAST_TABLE 10 +#define NSI_IP_NEIGHBOUR_TABLE 11 #define NSI_IP_FORWARD_TABLE 16 struct nsi_ipv4_unicast_key @@ -134,6 +135,39 @@ struct nsi_ip_unicast_static ULONG64 creation_time; }; +struct nsi_ipv4_neighbour_key +{ + NET_LUID luid; + NET_LUID luid2; + IN_ADDR addr; + DWORD pad; +}; + +struct nsi_ipv6_neighbour_key +{ + NET_LUID luid; + NET_LUID luid2; + IN6_ADDR addr; +}; + +struct nsi_ip_neighbour_rw +{ + BYTE phys_addr[IF_MAX_PHYS_ADDRESS_LENGTH]; +}; + +struct nsi_ip_neighbour_dynamic +{ + DWORD state; + DWORD time; + struct + { + USHORT is_router : 1; + USHORT is_unreachable : 1; + } flags; + USHORT phys_addr_len; + DWORD unk; +}; + struct nsi_ipv4_forward_key { DWORD unk; -- 2.23.0
[View Less]
1
0
0
0
[PATCH 7/9] gdi32: Handle metafiles directly in OffsetWindowOrgEx.
by Jacek Caban
10 Aug '21
10 Aug '21
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> --- dlls/gdi32/enhmfdrv/dc.c | 22 ---------------------- dlls/gdi32/enhmfdrv/enhmetafiledrv.h | 1 - dlls/gdi32/enhmfdrv/init.c | 2 +- dlls/gdi32/gdi_private.h | 1 + dlls/gdi32/gdidc.c | 17 +++++++++++++++++ dlls/gdi32/mapping.c | 26 -------------------------- dlls/gdi32/mfdrv/dc.c | 4 ++-- dlls/gdi32/mfdrv/init.c | 2 +-
…
[View More]
dlls/gdi32/mfdrv/metafiledrv.h | 1 - 9 files changed, 22 insertions(+), 54 deletions(-)
[View Less]
2
1
0
0
[PATCH v2 9/9] gdi32: Use ntgdi name for GetTextCharsetInfo.
by Huw Davies
10 Aug '21
10 Aug '21
From: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> --- dlls/gdi32/font.c | 8 ++++---- dlls/gdi32/gdi32.spec | 2 +- dlls/gdi32/uniscribe/shape.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c index 2e49f19b461..7e087d68db3 100644 --- a/dlls/gdi32/font.c +++ b/dlls/gdi32/font.c @@ -4205,9 +4205,9 @@
…
[View More]
static UINT get_text_charset_info(DC *dc, FONTSIGNATURE *fs, DWORD flags) } /*********************************************************************** - * GetTextCharsetInfo (GDI32.@) + * NtGdiGetTextCharsetInfo (win32u.@) */ -UINT WINAPI GetTextCharsetInfo(HDC hdc, FONTSIGNATURE *fs, DWORD flags) +UINT WINAPI NtGdiGetTextCharsetInfo( HDC hdc, FONTSIGNATURE *fs, DWORD flags ) { UINT ret = DEFAULT_CHARSET; DC *dc = get_dc_ptr(hdc); @@ -6977,7 +6977,7 @@ DWORD WINAPI GetFontLanguageInfo(HDC hdc) DWORD result=0; - GetTextCharsetInfo( hdc, &fontsig, 0 ); + NtGdiGetTextCharsetInfo( hdc, &fontsig, 0 ); /* We detect each flag we return using a bitmask on the Codepage Bitfields */ if( (fontsig.fsCsb[0]&GCP_DBCS_MASK)!=0 ) @@ -8083,7 +8083,7 @@ BOOL WINAPI GetFontResourceInfoW( LPCWSTR str, LPDWORD size, PVOID buffer, DWORD UINT WINAPI GetTextCharset(HDC hdc) { /* MSDN docs say this is equivalent */ - return GetTextCharsetInfo(hdc, NULL, 0); + return NtGdiGetTextCharsetInfo( hdc, NULL, 0 ); } /*********************************************************************** diff --git a/dlls/gdi32/gdi32.spec b/dlls/gdi32/gdi32.spec index 7ff32c58c26..6b8ed856ffa 100644 --- a/dlls/gdi32/gdi32.spec +++ b/dlls/gdi32/gdi32.spec @@ -345,7 +345,7 @@ @ stdcall GetTextAlign(long) @ stdcall GetTextCharacterExtra(long) @ stdcall GetTextCharset(long) -@ stdcall GetTextCharsetInfo(long ptr long) +@ stdcall GetTextCharsetInfo(long ptr long) NtGdiGetTextCharsetInfo @ stdcall GetTextColor(long) @ stdcall GetTextExtentExPointA(long str long long ptr ptr ptr) @ stdcall GetTextExtentExPointI(long ptr long long ptr ptr ptr) diff --git a/dlls/gdi32/uniscribe/shape.c b/dlls/gdi32/uniscribe/shape.c index 843d670f1e9..d65476f67b4 100644 --- a/dlls/gdi32/uniscribe/shape.c +++ b/dlls/gdi32/uniscribe/shape.c @@ -23,7 +23,7 @@ #include "windef.h" #include "winbase.h" -#include "wingdi.h" +#include "ntgdi.h" #include "winuser.h" #include "winnls.h" #include "usp10.h" @@ -594,7 +594,7 @@ static OPENTYPE_TAG get_opentype_script(HDC hdc, const SCRIPT_ANALYSIS *psa, /* * fall back to the font charset */ - charset = GetTextCharsetInfo(hdc, NULL, 0x0); + charset = NtGdiGetTextCharsetInfo(hdc, NULL, 0x0); switch (charset) { case ANSI_CHARSET: -- 2.23.0
[View Less]
1
0
0
0
[PATCH v2 8/9] gdi32: Remove no longer used driver entry points.
by Huw Davies
10 Aug '21
10 Aug '21
From: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> --- dlls/gdi32/dibdrv/dc.c | 14 -------------- dlls/gdi32/driver.c | 12 ------------ dlls/gdi32/enhmfdrv/init.c | 7 ------- dlls/gdi32/font.c | 7 ------- dlls/gdi32/mapping.c | 34 ---------------------------------- dlls/gdi32/mfdrv/init.c | 7 ------- dlls/gdi32/ntgdi_private.h | 6 -----
…
[View More]
- dlls/gdi32/path.c | 7 ------- dlls/wineandroid.drv/init.c | 7 ------- dlls/winemac.drv/gdi.c | 7 ------- dlls/wineps.drv/init.c | 7 ------- dlls/winex11.drv/init.c | 7 ------- dlls/winex11.drv/xrender.c | 7 ------- include/wine/gdi_driver.h | 9 +-------- 14 files changed, 1 insertion(+), 137 deletions(-) diff --git a/dlls/gdi32/dibdrv/dc.c b/dlls/gdi32/dibdrv/dc.c index 467cdb144e6..e12c5ec0751 100644 --- a/dlls/gdi32/dibdrv/dc.c +++ b/dlls/gdi32/dibdrv/dc.c @@ -682,8 +682,6 @@ const struct gdi_dc_funcs dib_driver = dibdrv_LineTo, /* pLineTo */ NULL, /* pModifyWorldTransform */ NULL, /* pMoveTo */ - NULL, /* pOffsetViewportOrg */ - NULL, /* pOffsetWindowOrg */ dibdrv_PaintRgn, /* pPaintRgn */ dibdrv_PatBlt, /* pPatBlt */ dibdrv_Pie, /* pPie */ @@ -704,7 +702,6 @@ const struct gdi_dc_funcs dib_driver = dibdrv_SelectBrush, /* pSelectBrush */ NULL, /* pSelectClipPath */ dibdrv_SelectFont, /* pSelectFont */ - NULL, /* pSelectPalette */ dibdrv_SelectPen, /* pSelectPen */ NULL, /* pSetBkColor */ dibdrv_SetBoundsRect, /* pSetBoundsRect */ @@ -715,10 +712,6 @@ const struct gdi_dc_funcs dib_driver = NULL, /* pSetDeviceGammaRamp */ dibdrv_SetPixel, /* pSetPixel */ NULL, /* pSetTextColor */ - NULL, /* pSetViewportExt */ - NULL, /* pSetViewportOrg */ - NULL, /* pSetWindowExt */ - NULL, /* pSetWindowOrg */ NULL, /* pSetWorldTransform */ NULL, /* pStartDoc */ NULL, /* pStartPage */ @@ -1262,8 +1255,6 @@ static const struct gdi_dc_funcs window_driver = windrv_LineTo, /* pLineTo */ NULL, /* pModifyWorldTransform */ NULL, /* pMoveTo */ - NULL, /* pOffsetViewportOrg */ - NULL, /* pOffsetWindowOrg */ windrv_PaintRgn, /* pPaintRgn */ windrv_PatBlt, /* pPatBlt */ windrv_Pie, /* pPie */ @@ -1284,7 +1275,6 @@ static const struct gdi_dc_funcs window_driver = NULL, /* pSelectBrush */ NULL, /* pSelectClipPath */ NULL, /* pSelectFont */ - NULL, /* pSelectPalette */ NULL, /* pSelectPen */ NULL, /* pSetBkColor */ windrv_SetBoundsRect, /* pSetBoundsRect */ @@ -1295,10 +1285,6 @@ static const struct gdi_dc_funcs window_driver = NULL, /* pSetDeviceGammaRamp */ windrv_SetPixel, /* pSetPixel */ NULL, /* pSetTextColor */ - NULL, /* pSetViewportExt */ - NULL, /* pSetViewportOrg */ - NULL, /* pSetWindowExt */ - NULL, /* pSetWindowOrg */ NULL, /* pSetWorldTransform */ NULL, /* pStartDoc */ NULL, /* pStartPage */ diff --git a/dlls/gdi32/driver.c b/dlls/gdi32/driver.c index 21e066630fc..eb4fd2ae99c 100644 --- a/dlls/gdi32/driver.c +++ b/dlls/gdi32/driver.c @@ -751,11 +751,6 @@ static HFONT CDECL nulldrv_SelectFont( PHYSDEV dev, HFONT font, UINT *aa_flags ) return font; } -static HPALETTE CDECL nulldrv_SelectPalette( PHYSDEV dev, HPALETTE palette, BOOL bkgnd ) -{ - return palette; -} - static HPEN CDECL nulldrv_SelectPen( PHYSDEV dev, HPEN pen, const struct brush_pattern *pattern ) { return pen; @@ -898,8 +893,6 @@ const struct gdi_dc_funcs null_driver = nulldrv_LineTo, /* pLineTo */ nulldrv_ModifyWorldTransform, /* pModifyWorldTransform */ nulldrv_MoveTo, /* pMoveTo */ - nulldrv_OffsetViewportOrgEx, /* pOffsetViewportOrg */ - nulldrv_OffsetWindowOrgEx, /* pOffsetWindowOrg */ nulldrv_PaintRgn, /* pPaintRgn */ nulldrv_PatBlt, /* pPatBlt */ nulldrv_Pie, /* pPie */ @@ -920,7 +913,6 @@ const struct gdi_dc_funcs null_driver = nulldrv_SelectBrush, /* pSelectBrush */ nulldrv_SelectClipPath, /* pSelectClipPath */ nulldrv_SelectFont, /* pSelectFont */ - nulldrv_SelectPalette, /* pSelectPalette */ nulldrv_SelectPen, /* pSelectPen */ nulldrv_SetBkColor, /* pSetBkColor */ nulldrv_SetBoundsRect, /* pSetBoundsRect */ @@ -931,10 +923,6 @@ const struct gdi_dc_funcs null_driver = nulldrv_SetDeviceGammaRamp, /* pSetDeviceGammaRamp */ nulldrv_SetPixel, /* pSetPixel */ nulldrv_SetTextColor, /* pSetTextColor */ - nulldrv_SetViewportExtEx, /* pSetViewportExt */ - nulldrv_SetViewportOrgEx, /* pSetViewportOrg */ - nulldrv_SetWindowExtEx, /* pSetWindowExt */ - nulldrv_SetWindowOrgEx, /* pSetWindowOrg */ nulldrv_SetWorldTransform, /* pSetWorldTransform */ nulldrv_StartDoc, /* pStartDoc */ nulldrv_StartPage, /* pStartPage */ diff --git a/dlls/gdi32/enhmfdrv/init.c b/dlls/gdi32/enhmfdrv/init.c index 424f69cd9b4..df34ae57756 100644 --- a/dlls/gdi32/enhmfdrv/init.c +++ b/dlls/gdi32/enhmfdrv/init.c @@ -96,8 +96,6 @@ static const struct gdi_dc_funcs emfdrv_driver = EMFDRV_LineTo, /* pLineTo */ EMFDRV_ModifyWorldTransform, /* pModifyWorldTransform */ NULL, /* pMoveTo */ - NULL, /* pOffsetViewportOrgEx */ - NULL, /* pOffsetWindowOrgEx */ NULL, /* pPaintRgn */ EMFDRV_PatBlt, /* pPatBlt */ EMFDRV_Pie, /* pPie */ @@ -118,7 +116,6 @@ static const struct gdi_dc_funcs emfdrv_driver = NULL, /* pSelectBrush */ EMFDRV_SelectClipPath, /* pSelectClipPath */ EMFDRV_SelectFont, /* pSelectFont */ - NULL, /* pSelectPalette */ NULL, /* pSelectPen */ EMFDRV_SetBkColor, /* pSetBkColor */ NULL, /* pSetBoundsRect */ @@ -129,10 +126,6 @@ static const struct gdi_dc_funcs emfdrv_driver = NULL, /* pSetDeviceGammaRamp */ EMFDRV_SetPixel, /* pSetPixel */ EMFDRV_SetTextColor, /* pSetTextColor */ - NULL, /* pSetViewportExtEx */ - NULL, /* pSetViewportOrgEx */ - NULL, /* pSetWindowExtEx */ - NULL, /* pSetWindowOrgEx */ EMFDRV_SetWorldTransform, /* pSetWorldTransform */ NULL, /* pStartDoc */ NULL, /* pStartPage */ diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c index b8dc2cc4b1f..2e49f19b461 100644 --- a/dlls/gdi32/font.c +++ b/dlls/gdi32/font.c @@ -3873,8 +3873,6 @@ const struct gdi_dc_funcs font_driver = NULL, /* pLineTo */ NULL, /* pModifyWorldTransform */ NULL, /* pMoveTo */ - NULL, /* pOffsetViewportOrg */ - NULL, /* pOffsetWindowOrg */ NULL, /* pPaintRgn */ NULL, /* pPatBlt */ NULL, /* pPie */ @@ -3895,7 +3893,6 @@ const struct gdi_dc_funcs font_driver = NULL, /* pSelectBrush */ NULL, /* pSelectClipPath */ font_SelectFont, /* pSelectFont */ - NULL, /* pSelectPalette */ NULL, /* pSelectPen */ NULL, /* pSetBkColor */ NULL, /* pSetBoundsRect */ @@ -3906,10 +3903,6 @@ const struct gdi_dc_funcs font_driver = NULL, /* pSetDeviceGammaRamp */ NULL, /* pSetPixel */ NULL, /* pSetTextColor */ - NULL, /* pSetViewportExt */ - NULL, /* pSetViewportOrg */ - NULL, /* pSetWindowExt */ - NULL, /* pSetWindowOrg */ NULL, /* pSetWorldTransform */ NULL, /* pStartDoc */ NULL, /* pStartPage */ diff --git a/dlls/gdi32/mapping.c b/dlls/gdi32/mapping.c index 3dcaf3f430f..f21b965bc4b 100644 --- a/dlls/gdi32/mapping.c +++ b/dlls/gdi32/mapping.c @@ -82,20 +82,6 @@ static void MAPPING_FixIsotropic( DC * dc ) } -/*********************************************************************** - * null driver fallback implementations - */ - -BOOL CDECL nulldrv_OffsetViewportOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt ) -{ - return TRUE; -} - -BOOL CDECL nulldrv_OffsetWindowOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt ) -{ - return TRUE; -} - BOOL set_map_mode( DC *dc, int mode ) { SIZE virtual_size, virtual_res; @@ -155,26 +141,6 @@ BOOL set_map_mode( DC *dc, int mode ) return TRUE; } -BOOL CDECL nulldrv_SetViewportExtEx( PHYSDEV dev, INT cx, INT cy, SIZE *size ) -{ - return TRUE; -} - -BOOL CDECL nulldrv_SetViewportOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt ) -{ - return TRUE; -} - -BOOL CDECL nulldrv_SetWindowExtEx( PHYSDEV dev, INT cx, INT cy, SIZE *size ) -{ - return TRUE; -} - -BOOL CDECL nulldrv_SetWindowOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt ) -{ - return TRUE; -} - BOOL CDECL nulldrv_ModifyWorldTransform( PHYSDEV dev, const XFORM *xform, DWORD mode ) { DC *dc = get_nulldrv_dc( dev ); diff --git a/dlls/gdi32/mfdrv/init.c b/dlls/gdi32/mfdrv/init.c index e6c2a905df8..17bef62018c 100644 --- a/dlls/gdi32/mfdrv/init.c +++ b/dlls/gdi32/mfdrv/init.c @@ -161,8 +161,6 @@ static const struct gdi_dc_funcs MFDRV_Funcs = NULL, /* pLineTo */ NULL, /* pModifyWorldTransform */ NULL, /* pMoveTo */ - NULL, /* pOffsetViewportOrgEx */ - NULL, /* pOffsetWindowOrgEx */ NULL, /* pPaintRgn */ NULL, /* pPatBlt */ NULL, /* pPie */ @@ -183,7 +181,6 @@ static const struct gdi_dc_funcs MFDRV_Funcs = NULL, /* pSelectBrush */ MFDRV_SelectClipPath, /* pSelectClipPath */ NULL, /* pSelectFont */ - NULL, /* pSelectPalette */ NULL, /* pSelectPen */ MFDRV_SetBkColor, /* pSetBkColor */ MFDRV_SetBoundsRect, /* pSetBoundsRect */ @@ -194,10 +191,6 @@ static const struct gdi_dc_funcs MFDRV_Funcs = NULL, /* pSetDeviceGammaRamp */ NULL, /* pSetPixel */ MFDRV_SetTextColor, /* pSetTextColor */ - NULL, /* pSetViewportExtEx */ - NULL, /* pSetViewportOrgEx */ - NULL, /* pSetWindowExtEx */ - NULL, /* pSetWindowOrgEx */ NULL, /* pSetWorldTransform */ NULL, /* pStartDoc */ NULL, /* pStartPage */ diff --git a/dlls/gdi32/ntgdi_private.h b/dlls/gdi32/ntgdi_private.h index 62e6e5101ee..560414b93c9 100644 --- a/dlls/gdi32/ntgdi_private.h +++ b/dlls/gdi32/ntgdi_private.h @@ -569,8 +569,6 @@ extern BOOL CDECL nulldrv_GradientFill( PHYSDEV dev, TRIVERTEX *vert_array, ULON void * grad_array, ULONG ngrad, ULONG mode ) DECLSPEC_HIDDEN; extern BOOL CDECL nulldrv_InvertRgn( PHYSDEV dev, HRGN rgn ) DECLSPEC_HIDDEN; extern BOOL CDECL nulldrv_ModifyWorldTransform( PHYSDEV dev, const XFORM *xform, DWORD mode ) DECLSPEC_HIDDEN; -extern BOOL CDECL nulldrv_OffsetViewportOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt ) DECLSPEC_HIDDEN; -extern BOOL CDECL nulldrv_OffsetWindowOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt ) DECLSPEC_HIDDEN; extern BOOL CDECL nulldrv_PolyBezier( PHYSDEV dev, const POINT *points, DWORD count ) DECLSPEC_HIDDEN; extern BOOL CDECL nulldrv_PolyBezierTo( PHYSDEV dev, const POINT *points, DWORD count ) DECLSPEC_HIDDEN; extern BOOL CDECL nulldrv_PolyDraw( PHYSDEV dev, const POINT *points, const BYTE *types, DWORD count ) DECLSPEC_HIDDEN; @@ -580,10 +578,6 @@ extern BOOL CDECL nulldrv_SelectClipPath( PHYSDEV dev, INT mode ) DECLSPEC_HIDDE extern INT CDECL nulldrv_SetDIBitsToDevice( PHYSDEV dev, INT x_dst, INT y_dst, DWORD width, DWORD height, INT x_src, INT y_src, UINT start, UINT lines, const void *bits, BITMAPINFO *info, UINT coloruse ) DECLSPEC_HIDDEN; -extern BOOL CDECL nulldrv_SetViewportExtEx( PHYSDEV dev, INT cx, INT cy, SIZE *size ) DECLSPEC_HIDDEN; -extern BOOL CDECL nulldrv_SetViewportOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt ) DECLSPEC_HIDDEN; -extern BOOL CDECL nulldrv_SetWindowExtEx( PHYSDEV dev, INT cx, INT cy, SIZE *size ) DECLSPEC_HIDDEN; -extern BOOL CDECL nulldrv_SetWindowOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt ) DECLSPEC_HIDDEN; extern BOOL CDECL nulldrv_SetWorldTransform( PHYSDEV dev, const XFORM *xform ) DECLSPEC_HIDDEN; extern BOOL CDECL nulldrv_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst, PHYSDEV src_dev, struct bitblt_coords *src, DWORD rop ) DECLSPEC_HIDDEN; diff --git a/dlls/gdi32/path.c b/dlls/gdi32/path.c index 57a93658abd..720b877e65c 100644 --- a/dlls/gdi32/path.c +++ b/dlls/gdi32/path.c @@ -2134,8 +2134,6 @@ const struct gdi_dc_funcs path_driver = pathdrv_LineTo, /* pLineTo */ NULL, /* pModifyWorldTransform */ pathdrv_MoveTo, /* pMoveTo */ - NULL, /* pOffsetViewportOrg */ - NULL, /* pOffsetWindowOrg */ NULL, /* pPaintRgn */ NULL, /* pPatBlt */ pathdrv_Pie, /* pPie */ @@ -2156,7 +2154,6 @@ const struct gdi_dc_funcs path_driver = NULL, /* pSelectBrush */ NULL, /* pSelectClipPath */ NULL, /* pSelectFont */ - NULL, /* pSelectPalette */ NULL, /* pSelectPen */ NULL, /* pSetBkColor */ NULL, /* pSetBoundsRect */ @@ -2167,10 +2164,6 @@ const struct gdi_dc_funcs path_driver = NULL, /* pSetDeviceGammaRamp */ NULL, /* pSetPixel */ NULL, /* pSetTextColor */ - NULL, /* pSetViewportExt */ - NULL, /* pSetViewportOrg */ - NULL, /* pSetWindowExt */ - NULL, /* pSetWindowOrg */ NULL, /* pSetWorldTransform */ NULL, /* pStartDoc */ NULL, /* pStartPage */ diff --git a/dlls/wineandroid.drv/init.c b/dlls/wineandroid.drv/init.c index b3d4f945993..474c3089677 100644 --- a/dlls/wineandroid.drv/init.c +++ b/dlls/wineandroid.drv/init.c @@ -343,8 +343,6 @@ static const struct gdi_dc_funcs android_drv_funcs = NULL, /* pLineTo */ NULL, /* pModifyWorldTransform */ NULL, /* pMoveTo */ - NULL, /* pOffsetViewportOrg */ - NULL, /* pOffsetWindowOrg */ NULL, /* pPaintRgn */ NULL, /* pPatBlt */ NULL, /* pPie */ @@ -365,7 +363,6 @@ static const struct gdi_dc_funcs android_drv_funcs = NULL, /* pSelectBrush */ NULL, /* pSelectClipPath */ NULL, /* pSelectFont */ - NULL, /* pSelectPalette */ NULL, /* pSelectPen */ NULL, /* pSetBkColor */ NULL, /* pSetBoundsRect */ @@ -376,10 +373,6 @@ static const struct gdi_dc_funcs android_drv_funcs = NULL, /* pSetDeviceGammaRamp */ NULL, /* pSetPixel */ NULL, /* pSetTextColor */ - NULL, /* pSetViewportExt */ - NULL, /* pSetViewportOrg */ - NULL, /* pSetWindowExt */ - NULL, /* pSetWindowOrg */ NULL, /* pSetWorldTransform */ NULL, /* pStartDoc */ NULL, /* pStartPage */ diff --git a/dlls/winemac.drv/gdi.c b/dlls/winemac.drv/gdi.c index b657afd5943..7c635c200d9 100644 --- a/dlls/winemac.drv/gdi.c +++ b/dlls/winemac.drv/gdi.c @@ -323,8 +323,6 @@ static const struct gdi_dc_funcs macdrv_funcs = NULL, /* pLineTo */ NULL, /* pModifyWorldTransform */ NULL, /* pMoveTo */ - NULL, /* pOffsetViewportOrg */ - NULL, /* pOffsetWindowOrg */ NULL, /* pPaintRgn */ NULL, /* pPatBlt */ NULL, /* pPie */ @@ -345,7 +343,6 @@ static const struct gdi_dc_funcs macdrv_funcs = NULL, /* pSelectBrush */ NULL, /* pSelectClipPath */ NULL, /* pSelectFont */ - NULL, /* pSelectPalette */ NULL, /* pSelectPen */ NULL, /* pSetBkColor */ NULL, /* pSetBoundsRect */ @@ -356,10 +353,6 @@ static const struct gdi_dc_funcs macdrv_funcs = macdrv_SetDeviceGammaRamp, /* pSetDeviceGammaRamp */ NULL, /* pSetPixel */ NULL, /* pSetTextColor */ - NULL, /* pSetViewportExt */ - NULL, /* pSetViewportOrg */ - NULL, /* pSetWindowExt */ - NULL, /* pSetWindowOrg */ NULL, /* pSetWorldTransform */ NULL, /* pStartDoc */ NULL, /* pStartPage */ diff --git a/dlls/wineps.drv/init.c b/dlls/wineps.drv/init.c index e71e82e092f..673f36749ae 100644 --- a/dlls/wineps.drv/init.c +++ b/dlls/wineps.drv/init.c @@ -837,8 +837,6 @@ static const struct gdi_dc_funcs psdrv_funcs = PSDRV_LineTo, /* pLineTo */ NULL, /* pModifyWorldTransform */ NULL, /* pMoveTo */ - NULL, /* pOffsetViewportOrg */ - NULL, /* pOffsetWindowOrg */ PSDRV_PaintRgn, /* pPaintRgn */ PSDRV_PatBlt, /* pPatBlt */ PSDRV_Pie, /* pPie */ @@ -859,7 +857,6 @@ static const struct gdi_dc_funcs psdrv_funcs = PSDRV_SelectBrush, /* pSelectBrush */ NULL, /* pSelectClipPath */ PSDRV_SelectFont, /* pSelectFont */ - NULL, /* pSelectPalette */ PSDRV_SelectPen, /* pSelectPen */ PSDRV_SetBkColor, /* pSetBkColor */ NULL, /* pSetBoundsRect */ @@ -870,10 +867,6 @@ static const struct gdi_dc_funcs psdrv_funcs = NULL, /* pSetDeviceGammaRamp */ PSDRV_SetPixel, /* pSetPixel */ PSDRV_SetTextColor, /* pSetTextColor */ - NULL, /* pSetViewportExt */ - NULL, /* pSetViewportOrg */ - NULL, /* pSetWindowExt */ - NULL, /* pSetWindowOrg */ NULL, /* pSetWorldTransform */ PSDRV_StartDoc, /* pStartDoc */ PSDRV_StartPage, /* pStartPage */ diff --git a/dlls/winex11.drv/init.c b/dlls/winex11.drv/init.c index 937286b8601..1c14d62ce3c 100644 --- a/dlls/winex11.drv/init.c +++ b/dlls/winex11.drv/init.c @@ -402,8 +402,6 @@ static const struct gdi_dc_funcs x11drv_funcs = X11DRV_LineTo, /* pLineTo */ NULL, /* pModifyWorldTransform */ NULL, /* pMoveTo */ - NULL, /* pOffsetViewportOrg */ - NULL, /* pOffsetWindowOrg */ X11DRV_PaintRgn, /* pPaintRgn */ X11DRV_PatBlt, /* pPatBlt */ X11DRV_Pie, /* pPie */ @@ -424,7 +422,6 @@ static const struct gdi_dc_funcs x11drv_funcs = X11DRV_SelectBrush, /* pSelectBrush */ NULL, /* pSelectClipPath */ X11DRV_SelectFont, /* pSelectFont */ - NULL, /* pSelectPalette */ X11DRV_SelectPen, /* pSelectPen */ NULL, /* pSetBkColor */ X11DRV_SetBoundsRect, /* pSetBoundsRect */ @@ -435,10 +432,6 @@ static const struct gdi_dc_funcs x11drv_funcs = X11DRV_SetDeviceGammaRamp, /* pSetDeviceGammaRamp */ X11DRV_SetPixel, /* pSetPixel */ NULL, /* pSetTextColor */ - NULL, /* pSetViewportExt */ - NULL, /* pSetViewportOrg */ - NULL, /* pSetWindowExt */ - NULL, /* pSetWindowOrg */ NULL, /* pSetWorldTransform */ NULL, /* pStartDoc */ NULL, /* pStartPage */ diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c index 3ab576ea8d5..804982d1a3c 100644 --- a/dlls/winex11.drv/xrender.c +++ b/dlls/winex11.drv/xrender.c @@ -2214,8 +2214,6 @@ static const struct gdi_dc_funcs xrender_funcs = NULL, /* pLineTo */ NULL, /* pModifyWorldTransform */ NULL, /* pMoveTo */ - NULL, /* pOffsetViewportOrg */ - NULL, /* pOffsetWindowOrg */ NULL, /* pPaintRgn */ NULL, /* pPatBlt */ NULL, /* pPie */ @@ -2236,7 +2234,6 @@ static const struct gdi_dc_funcs xrender_funcs = xrenderdrv_SelectBrush, /* pSelectBrush */ NULL, /* pSelectClipPath */ xrenderdrv_SelectFont, /* pSelectFont */ - NULL, /* pSelectPalette */ NULL, /* pSelectPen */ NULL, /* pSetBkColor */ NULL, /* pSetBoundsRect */ @@ -2247,10 +2244,6 @@ static const struct gdi_dc_funcs xrender_funcs = NULL, /* pSetDeviceGammaRamp */ NULL, /* pSetPixel */ NULL, /* pSetTextColor */ - NULL, /* pSetViewportExt */ - NULL, /* pSetViewportOrg */ - NULL, /* pSetWindowExt */ - NULL, /* pSetWindowOrg */ NULL, /* pSetWorldTransform */ NULL, /* pStartDoc */ NULL, /* pStartPage */ diff --git a/include/wine/gdi_driver.h b/include/wine/gdi_driver.h index ffa730f9105..13aac87887f 100644 --- a/include/wine/gdi_driver.h +++ b/include/wine/gdi_driver.h @@ -127,8 +127,6 @@ struct gdi_dc_funcs BOOL (CDECL *pLineTo)(PHYSDEV,INT,INT); BOOL (CDECL *pModifyWorldTransform)(PHYSDEV,const XFORM*,DWORD); BOOL (CDECL *pMoveTo)(PHYSDEV,INT,INT); - BOOL (CDECL *pOffsetViewportOrgEx)(PHYSDEV,INT,INT,POINT*); - BOOL (CDECL *pOffsetWindowOrgEx)(PHYSDEV,INT,INT,POINT*); BOOL (CDECL *pPaintRgn)(PHYSDEV,HRGN); BOOL (CDECL *pPatBlt)(PHYSDEV,struct bitblt_coords*,DWORD); BOOL (CDECL *pPie)(PHYSDEV,INT,INT,INT,INT,INT,INT,INT,INT); @@ -149,7 +147,6 @@ struct gdi_dc_funcs HBRUSH (CDECL *pSelectBrush)(PHYSDEV,HBRUSH,const struct brush_pattern*); BOOL (CDECL *pSelectClipPath)(PHYSDEV,INT); HFONT (CDECL *pSelectFont)(PHYSDEV,HFONT,UINT*); - HPALETTE (CDECL *pSelectPalette)(PHYSDEV,HPALETTE,BOOL); HPEN (CDECL *pSelectPen)(PHYSDEV,HPEN,const struct brush_pattern*); COLORREF (CDECL *pSetBkColor)(PHYSDEV,COLORREF); UINT (CDECL *pSetBoundsRect)(PHYSDEV,RECT*,UINT); @@ -160,10 +157,6 @@ struct gdi_dc_funcs BOOL (CDECL *pSetDeviceGammaRamp)(PHYSDEV,LPVOID); COLORREF (CDECL *pSetPixel)(PHYSDEV,INT,INT,COLORREF); COLORREF (CDECL *pSetTextColor)(PHYSDEV,COLORREF); - BOOL (CDECL *pSetViewportExtEx)(PHYSDEV,INT,INT,SIZE*); - BOOL (CDECL *pSetViewportOrgEx)(PHYSDEV,INT,INT,POINT*); - BOOL (CDECL *pSetWindowExtEx)(PHYSDEV,INT,INT,SIZE*); - BOOL (CDECL *pSetWindowOrgEx)(PHYSDEV,INT,INT,POINT*); BOOL (CDECL *pSetWorldTransform)(PHYSDEV,const XFORM*); INT (CDECL *pStartDoc)(PHYSDEV,const DOCINFOW*); INT (CDECL *pStartPage)(PHYSDEV); @@ -183,7 +176,7 @@ struct gdi_dc_funcs }; /* increment this when you change the DC function table */ -#define WINE_GDI_DRIVER_VERSION 58 +#define WINE_GDI_DRIVER_VERSION 59 #define GDI_PRIORITY_NULL_DRV 0 /* null driver */ #define GDI_PRIORITY_FONT_DRV 100 /* any font driver */ -- 2.23.0
[View Less]
1
0
0
0
← Newer
1
...
67
68
69
70
71
72
73
...
93
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
Results per page:
10
25
50
100
200