IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
* defs.h (print_ax25_addr): New prototype.
* print_fields.h (PRINT_FIELD_AX25_ADDR): New macro.
* sockaddr.c: Include <linux/ax25.h>.
(check_ax25_address, ax25_addr2str, print_ax25_addr_raw,
print_ax25_addr, print_sockaddr_data_ax25): New functions.
(sa_printers) <[AF_AX25]>: New printer.
* tests/net-sockaddr.c (AX25_ADDR): New macro.
(check_ax25): New function.
(main): Use it to check AX.25 socket address decoding.
Apparently, struct sockaddr_l2 changed over time: the l2_bdaddr_type
field was added only by commit v3.5-rc1~35^2~3^2~18^2^2~39.
* configure.ac (AC_CHECK_HEADERS): Move bluetooth/bluetooth.h check into
a separate check.
(AC_CHECK_HEADERS([bluetooth/bluetooth.h])): New check, also checks for
struct sockaddr_l2.l2_bdaddr_type member in case of success.
* sockaddr.c (print_sockaddr_data_bt) <case offsetof(struct sockaddr_l2,
l2_bdaddr_type)>: Add to sizeof(struct sockaddr_l2) case. Print
l2_bdaddr_type field only if the provided sockaddr is big enough.
* tests/net-sockaddr.c (check_l2): Put l2_bdaddr_type usage/printing
under HAVE_STRUCT_SOCKADDR_L2_L2_BDADDR_TYPE ifdef, add a check for the
sockaddr_l2 structure without the l2_bdaddr_type field.
This xlat table is quite big.
* sockaddr.c (print_sockaddr_data_ll): Replace printxval call with
printxval_search for printing of struct sockaddr_ll.sll_hatype field.
* print_mac.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* defs.h (sprint_mac_addr): New declaration.
(print_mac_addr): New function, a thin wrapper around sprint_mac_addr.
* print_fields.h (PRINT_FIELD_MAC, PRINT_FIELD_MAC_SZ): New macros.
* rtnl_link.c (decode_ifla_bridge_id): Use PRINT_FIELD_MAC for bridge
address printing.
* sock.c (print_ifreq) <case SIOCGIFHWADDR>: Use print_mac_addr for
ifr_hwaddr printing.
* sockaddr.c (print_sockaddr_data_bt): Use print_mac_addr for
{sco,rc,l2}_bdaddr field printing.
Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
* xlat/bluetooth_l2_cid.in: New file.
* sockaddr.c: Include xlat/bluetooth_l2_cid.h.
(print_bluetooth_l2_cid): New function.
(print_sockaddr_data_bt): Use it to decode struct sockaddr_l2.l2_cid
field.
* tests/net-sockaddr.c (check_l2): Update expected output.
Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
* xlat/bluetooth_l2_psm.in: New file.
* sockaddr.c: Include xlat/bluetooth_l2_psm.h.
(print_bluetooth_l2_psm): New function.
(print_sockaddr_data_bt): Use it to decode struct sockaddr_l2.l2_psm
field.
* tests/net-sockaddr.c (check_l2): Update expected output.
* xlat/bdaddr_types.in: New file.
* sockaddr.c: Include xlat/bdaddr_types.h.
(print_sockaddr_data_bt): Decode struct sockaddr_l2.l2_bdaddr_type field
using constants from bdaddr_types xlat.
* tests/net-sockaddr.c (check_l2): Check decoding
of struct sockaddr_l2.l2_bdaddr_type field.
* sockaddr.c [HAVE_BLUETOOTH_BLUETOOTH_H]: Do not include
bluetooth/bluetooth.h, bluetooth/hci.h, bluetooth/l2cap.h,
bluetooth/rfcomm.h, and bluetooth/sco.h.
[!HAVE_BLUETOOTH_BLUETOOTH_H]: Include xlat/hci_channels.h.
(btohs): New function.
(print_sockaddr_data_bt): Define unconditionally, add definitions
of struct sockaddr_hci, struct bdaddr, struct sockaddr_sco,
struct sockaddr_rc, and struct sockaddr_l2.
(sa_printers) <AF_BLUETOOTH>: Define unconditionally.
Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
* defs.h (ethernet_protocols_size): New declaration.
* netlink_packet_diag.c (decode_packet_diag_req): Use
printxval_searchnn to print Ethernet protocols.
* sockaddr.c (ethernet_protocols_size): New constant, item count
in ethernet_protocols array.
(print_sockaddr_data_ll): Use printxval_search instead of
printxval to print Ethernet protocols.
* xlat/ethernet_protocols.in: Sort it by value, add comment
about the fact.
Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
Prepare print_inet_addr for use in structureless contexts where
no structure field name is available.
* sockaddr.c (print_inet_addr): Handle var_name == NULL.
* print_fields.h (PRINT_FIELD_0X): New macro.
* sockaddr.c (print_sockaddr_data_ipx, print_sockaddr_data_nl): Use it
instead of manual tprintf statements.
* netlink_sock_diag.c (PRINT_FIELD_SMC_DIAG_CONNINFO_FLAGS): Remove.
(decode_smc_diag_conninfo): Replace it with PRINT_FIELD_0X.
print_sockaddr does not use its first argument, remove it.
* defs.h (print_sockaddr): Remove argument.
* sockaddr.c (print_sockaddr): Remove argument. All callers updated.
* sock.c (PRINT_IFREQ_ADDR): Likewise.
* print_fields.h (PRINT_FIELD_NET_PORT): New macro.
* netlink_sock_diag.c (print_inet_diag_sockid): Use it
instead of a manual tprintf statement.
* sockaddr.c (print_sockaddr_data_in, print_sockaddr_data_in6,
print_sockaddr_data_ipx): Likewise.
Remove temporary types created for transition from long
to kernel_ulong_t.
Automatically replace kernel_scno_t and kernel_ureg_t with
kernel_ulong_t using
$ git grep -El 'kernel_(scno|ureg)_t' |
xargs sed -ri 's/kernel_(scno|ureg)_t/kernel_ulong_t/g'
* kernel_types.h (kernel_scno_t, kernel_ureg_t): Remove.
All users updated.