nmblookup

博客介绍了查询主机名的方法,给出示例命令nmblookup -A 192.168.2.102,可用于通过IP地址查询对应的主机名。

查询主机名,eg

nmblookup -A 192.168.2.102


这个makefile是什么意思 # # Copyright (C) 2007-2012 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. # include $(TOPDIR)/rules.mk PKG_NAME:=samba PKG_VERSION:=4.7.6 PKG_RELEASE:=1.1 PKG_SOURCE_URL:=http://ftp.samba.org/pub/samba \ http://ftp.samba.org/pub/samba/stable PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_MD5SUM:=76da2fa64edd94a0188531e7ecb27c4e PKG_LICENSE:=GPLv3 PKG_LICENSE_FILES:=COPYING PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org> PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk MAKE_PATH:=source3 CONFIGURE_PATH:=source3 PKG_BUILD_BIN:=$(PKG_BUILD_DIR)/$(MAKE_PATH)/bin define Package/samba36-server SECTION:=net # CATEGORY:=Network CATEGORY:=TP-LINK iplatform apps SUBMENU:=USB Storage Sharing TITLE:=Samba 3.6 SMB/CIFS server URL:=http://www.samba.org/ DEPENDS:=+USE_EGLIBC:librt +libuuid +libubox +libubus +usb_sync endef define Package/samba36-client SECTION:=net CATEGORY:=TP-LINK iplatform apps TITLE:=Samba 3.6 SMB/CIFS client URL:=http://www.samba.org/ DEPENDS:=+libreadline +libncurses endef define Package/nmbd SECTION:=net CATEGORY:=TP-LINK iplatform apps SUBMENU:=USB Storage Sharing TITLE:=NetBIOS name server DEPENDS:=+USE_EGLIBC:librt +libuuid +libubox +libubus +usb_sync endef define Package/samba36-libs SECTION:=libs CATEGORY:=Libraries TITLE:=Samba shared libraries (libsmbclient) DEPENDS:=+samba36-server PROVIDES:=libsmbclient endef define Package/samba36-libs/description This package provides the shared libraries for Samba, including libsmbclient. endef define Package/samba36-server/config config PACKAGE_SAMBA_MAX_DEBUG_LEVEL int "Maximum level of compiled-in debug messages" depends PACKAGE_samba36-server || PACKAGE_samba36-client #depends PACKAGE_samba36-server || PACKAGE_nmbd default -1 config PACKAGE_SAMBA_GUEST_NETWORK_LIMIT bool "limit guest network access" default n help Feature: samba limit guest network access endef define Package/samba36-server/description The Samba software suite is a collection of programs that implements the SMB protocol for UNIX systems, allowing you to serve files and printers to Windows, NT, OS/2 and DOS clients. This protocol is sometimes also referred to as the LanManager or Netbios protocol. endef ifeq ($(CONFIG_RTL_SENDFILE_PATCH),y) TARGET_CFLAGS += -DCONFIG_RTL_SENDFILE_PATCH endif TARGET_CFLAGS += -DMAX_DEBUG_LEVEL=$(CONFIG_PACKAGE_SAMBA_MAX_DEBUG_LEVEL) -D__location__=\\\"\\\" -ffunction-sections -fdata-sections TARGET_LDFLAGS += -Wl,--gc-sections -lubox -lubus -lifaddrs ifeq ($(CONFIG_PACKAGE_SAMBA_GUEST_NETWORK_LIMIT), y) TARGET_CFLAGS += -DGUEST_NETWORK_LIMIT=1 endif CONFIGURE_VARS += \ ac_cv_lib_attr_getxattr=no \ ac_cv_search_getxattr=no \ ac_cv_file__proc_sys_kernel_core_pattern=yes \ libreplace_cv_HAVE_C99_VSNPRINTF=yes \ libreplace_cv_HAVE_IFACE_IFCONF=yes \ libreplace_cv_HAVE_GETADDRINFO=yes \ LINUX_LFS_SUPPORT=yes \ samba_cv_CC_NEGATIVE_ENUM_VALUES=yes \ samba_cv_HAVE_GETTIMEOFDAY_TZ=yes \ samba_cv_HAVE_IFACE_IFCONF=yes \ samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes \ samba_cv_HAVE_SECURE_MKSTEMP=yes \ samba_cv_HAVE_WRFILE_KEYTAB=no \ samba_cv_USE_SETREUID=yes \ samba_cv_USE_SETRESUID=yes \ samba_cv_have_setreuid=yes \ samba_cv_have_setresuid=yes \ ac_cv_header_zlib_h=no \ samba_cv_zlib_1_2_3=no CONFIGURE_ARGS += \ --exec-prefix=/usr \ --prefix=/ \ --disable-avahi \ --disable-cups \ --disable-pie \ --disable-relro \ --disable-static \ --disable-swat \ --enable-shared-libs \ --with-codepagedir=/etc/samba \ --with-configdir=/etc/samba \ --with-included-iniparser \ --with-included-popt \ --with-lockdir=/var/lock \ --with-logfilebase=/var/log \ --with-nmbdsocketdir=/var/nmbd \ --with-piddir=/var/run \ --with-privatedir=/etc/samba \ --with-sendfile-support \ --without-acl-support \ --without-cluster-support \ --without-ads \ --without-krb5 \ --without-ldap \ --without-pam \ --without-winbind \ --without-libtdb \ --without-libtalloc \ --without-libnetapi \ --without-libsmbsharemodes \ --without-libtevent \ --without-libaddns \ --with-shared-modules=pdb_tdbsam,pdb_wbc_sam,idmap_nss,nss_info_template,auth_winbind,auth_wbc,auth_domain MAKE_FLAGS += DYNEXP= PICFLAG= MODULES= define Build/Prepare mkdir -p $(PKG_BUILD_DIR) $(CP) ./src/* $(PKG_BUILD_DIR) endef define Package/samba36-server/install $(INSTALL_DIR) $(1)/etc/config $(INSTALL_DATA) ./filesystem/etc/config/samba $(1)/etc/config/samba $(INSTALL_DIR) $(1)/etc/samba $(INSTALL_DATA) ./filesystem/etc/samba/smb.conf.template $(1)/etc/samba $(INSTALL_DATA) ./filesystem/etc/samba/smbusers $(1)/etc/samba $(INSTALL_DATA) ./filesystem/etc/samba/lognames.deny $(1)/etc/samba $(INSTALL_DATA) $(PKG_BUILD_DIR)/codepages/lowcase.dat $(1)/etc/samba $(INSTALL_DATA) $(PKG_BUILD_DIR)/codepages/upcase.dat $(1)/etc/samba $(INSTALL_DATA) $(PKG_BUILD_DIR)/codepages/valid.dat $(1)/etc/samba $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_BIN) ./filesystem/etc/init.d/samba $(1)/etc/init.d/samba $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_BUILD_BIN)/samba_multicall $(1)/usr/sbin ln -sf samba_multicall $(1)/usr/sbin/smbd ln -sf samba_multicall $(1)/usr/sbin/nmbd ln -sf samba_multicall $(1)/usr/sbin/smbpasswd endef define Package/samba36-client/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_BUILD_BIN)/smbclient $(1)/usr/sbin $(INSTALL_BIN) $(PKG_BUILD_BIN)/nmblookup $(1)/usr/sbin endef define Package/nmbd/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_BUILD_BIN)/nmbd $(1)/usr/sbin endef # 新增共享库包定义 define Package/samba36-libs SECTION:=libs CATEGORY:=Libraries TITLE:=Samba shared libraries DEPENDS:=+samba36-server endef define Package/samba36-libs/install # 创建库目录 $(INSTALL_DIR) $(1)/usr/lib # 安装核心库文件 $(INSTALL_DATA) $(PKG_BUILD_BIN)/libsmbclient.so.* $(1)/usr/lib/ # 创建符号链接 ln -sf libsmbclient.so.0 $(1)/usr/lib/libsmbclient.so # 安装其他依赖库(根据实际需要添加) #$(INSTALL_DATA) $(PKG_BUILD_DIR)/bin/shared/libwbclient.so.* $(1)/usr/lib/ #ln -sf libwbclient.so.0 $(1)/usr/lib/libwbclient.so endef # 激活库包构建 $(eval $(call BuildPackage,samba36-libs)) #$(eval $(call BuildPackage,samba36-client)) $(eval $(call BuildPackage,samba36-server)) $(eval $(call BuildPackage,samba36-client)) #$(eval $(call BuildPackage,nmbd))
最新发布
11-02
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

duanbeibei

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值