乐于分享
好东西不私藏

Generic Netlink 示例源码

Generic Netlink 示例源码
0. 源码获取方式
git clone https://git.yaroslavps.com/genltest
源码目录结构如下:
1. kernel 部分源码

genltest.c

/* SPDX-License-Identifier: GPL-2.0 *//* * Generic Netlink example module * * An example on how to use the Generic Netlink API with ops and multicast * groups. * *  Copyright (c) 2022 Yaroslav de la Peña Smirnov <yps@yaroslavps.com> */#define pr_fmt(fmt) "genltest: " fmt#include"genltest.h"#include<linux/module.h>#include<net/genetlink.h>/* * Some materials that were used as source for this example/tutorial/guide: * * - https://wiki.linuxfoundation.org/networking/generic_netlink_howto * - https://kernel.org/doc/html/next/userspace-api/netlink/intro.html */#define MSG_MAX_LEN 1024/* Forward declaration */static struct genl_family genl_fam;/* Handler for GENLTEST_CMD_ECHO messages received */staticintecho_doit(struct sk_buff *skb, struct genl_info *info){int		ret = 0;void	       *hdr;struct sk_buff *msg;/* Check if the attribute is present and print it */if (info->attrs[GENLTEST_A_MSG]) {char *str = nla_data(info->attrs[GENLTEST_A_MSG]);pr_info("message received: %s\n", str);else {pr_info("empty message received\n");	}/* Allocate a new buffer for the reply */	msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);if (!msg) {pr_err("failed to allocate message buffer\n");return -ENOMEM;	}/* Put the Generic Netlink header */	hdr = genlmsg_put(msg, info->snd_portid, info->snd_seq, &genl_fam, 0,			  GENLTEST_CMD_ECHO);if (!hdr) {pr_err("failed to create genetlink header\n");nlmsg_free(msg);return -EMSGSIZE;	}/* And the message */if ((ret = nla_put_string(msg, GENLTEST_A_MSG,				  "Hello from Kernel Space, Netlink!"))) {pr_err("failed to create message string\n");genlmsg_cancel(msg, hdr);nlmsg_free(msg);goto out;	}/* Finalize the message and send it */genlmsg_end(msg, hdr);	ret = genlmsg_reply(msg, info);pr_info("reply sent\n");out:return ret;}/* Attribute validation policy for our echo command */static struct nla_policy echo_pol[GENLTEST_A_MAX + 1] = {	[GENLTEST_A_MSG] = { .type = NLA_NUL_STRING },};/* Operations for our Generic Netlink family */static struct genl_ops genl_ops[] = {	{		.cmd	= GENLTEST_CMD_ECHO,		.policy = echo_pol,		.doit	= echo_doit,	 },};/* Multicast groups for our family */static const struct genl_multicast_group genl_mcgrps[] = {	{ .name = GENLTEST_MC_GRP_NAME },};/* Generic Netlink family */static struct genl_family genl_fam = {	.name	  = GENLTEST_GENL_NAME,	.version  = GENLTEST_GENL_VERSION,	.maxattr  = GENLTEST_A_MAX,	.ops	  = genl_ops,	.n_ops	  = ARRAY_SIZE(genl_ops),	.mcgrps	  = genl_mcgrps,	.n_mcgrps = ARRAY_SIZE(genl_mcgrps),};/* Multicast ping message to our genl multicast group */staticintecho_ping(constchar *buf, size_t cnt){int		ret = 0;void	       *hdr;/* Allocate message buffer */struct sk_buff *skb = genlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);if (unlikely(!skb)) {pr_err("failed to allocate memory for genl message\n");return -ENOMEM;	}/* Put the Generic Netlink header */	hdr = genlmsg_put(skb, 00, &genl_fam, 0, GENLTEST_CMD_ECHO);if (unlikely(!hdr)) {pr_err("failed to allocate memory for genl header\n");nlmsg_free(skb);return -ENOMEM;	}/* And the message */if ((ret = nla_put_string(skb, GENLTEST_A_MSG, buf))) {pr_err("unable to create message string\n");genlmsg_cancel(skb, hdr);nlmsg_free(skb);return ret;	}/* Finalize the message */genlmsg_end(skb, hdr);/* Send it over multicast to the 0-th mc group in our array. */	ret = genlmsg_multicast(&genl_fam, skb, 00, GFP_KERNEL);if (ret == -ESRCH) {pr_warn("multicast message sent, but nobody was listening...\n");else if (ret) {pr_err("failed to send multicast genl message\n");else {pr_info("multicast message sent\n");	}return ret;}/* * Test sysfs attr to send multicast messages. The string in the buffer will be  * echoed to the multicast group. */staticssize_tping_store(struct kobject *kobj, struct kobj_attribute *attr,			  const char *buf, size_t cnt){int max = cnt > MSG_MAX_LEN ? MSG_MAX_LEN : cnt;echo_ping(buf, max);return max;}static struct kobject	    *kobj;static struct kobj_attribute ping_attr = __ATTR_WO(ping);staticint __init init_genltest(void){int ret = 0;pr_info("init start\n");	kobj = kobject_create_and_add("genltest", kobj);if (unlikely(!kobj)) {pr_err("unable to create kobject\n");return -ENOMEM;	}	ret = sysfs_create_file(kobj, &ping_attr.attr);if (unlikely(ret)) {pr_err("unable to create sysfs file\n");kobject_put(kobj);return ret;	}	ret = genl_register_family(&genl_fam);if (unlikely(ret)) {pr_crit("failed to register generic netlink family\n");sysfs_remove_file(kobj, &ping_attr.attr);kobject_put(kobj);	}pr_info("init end\n");return ret;}staticvoid __exit exit_genltest(void){if (unlikely(genl_unregister_family(&genl_fam))) {pr_err("failed to unregister generic netlink family\n");	}sysfs_remove_file(kobj, &ping_attr.attr);kobject_put(kobj);pr_info("exit\n");}MODULE_AUTHOR("Yaroslav de la Peña Smirnov");MODULE_LICENSE("GPL");module_init(init_genltest);module_exit(exit_genltest);

genltest.h

#ifndef GENLTEST_H#define GENLTEST_H/* * This header includes definitions that are shared with kernel space and user * space. This header would be put in a place visible to user space. */#define GENLTEST_GENL_NAME "genltest"#define GENLTEST_GENL_VERSION 1#define GENLTEST_MC_GRP_NAME "mcgrp"/* Attributes */enum genltest_attrs {	GENLTEST_A_UNSPEC,	GENLTEST_A_MSG,	__GENLTEST_A_MAX,};#define GENLTEST_A_MAX (__GENLTEST_A_MAX - 1)/* Commands */enum genltest_cmds {	GENLTEST_CMD_UNSPEC,	GENLTEST_CMD_ECHO,	__GENLTEST_CMD_MAX,};#define GENLTEST_CMD_MAX (__GENLTEST_CMD_MAX - 1)#endif
Makefile
KERNELDIR := /lib/modules/$(shell uname -r)/build# CFLAGS_genltest.o := -O0obj-m += genltest.oall:	$(MAKE) -C $(KERNELDIR) V=0  M=`pwd` modulesclean:#$(MAKE) -C $(KERNELDIR)  M=`pwd` clean@rm -f *.ko *.o modules.order Module.symvers *.mod.? *~@rm -rf .tmp_versions .cache.mk *.ur-safe *.mod
2. 用户空间部分

genltest.c

/* SPDX-License-Identifier: GPL-2.0 *//* * Generic Netlink libnl example program * * An example on how to use the libnl library for communicating over Generic * Netlink with kernel modules, with unicast and multicast group messages. * *  Copyright (c) 2022 Yaroslav de la Peña Smirnov <yps@yaroslavps.com> */#include<stdio.h>#include<errno.h>#include<signal.h>#include<stdbool.h>#include<netlink/socket.h>#include<netlink/netlink.h>#include<netlink/genl/ctrl.h>#include<netlink/genl/genl.h>#include<netlink/genl/family.h>#include"../ks/genltest.h"#define prerr(...) fprintf(stderr, "error: " __VA_ARGS__)/* * libnl docs and API: https://www.infradead.org/~tgr/libnl/ * Current libnl repo: https://github.com/thom311/libnl *//* * Handler for all received messages from our Generic Netlink family, both * unicast and multicast. */staticintecho_reply_handler(struct nl_msg *msg, void *arg){int		   err	   = 0;struct genlmsghdr *genlhdr = nlmsg_data(nlmsg_hdr(msg));struct nlattr	  *tb[GENLTEST_A_MAX + 1];/* Parse the attributes */	err = nla_parse(tb, GENLTEST_A_MAX, genlmsg_attrdata(genlhdr, 0),genlmsg_attrlen(genlhdr, 0), NULL);if (err) {prerr("unable to parse message: %s\n"strerror(-err));return NL_SKIP;	}/* Check that there's actually a payload */if (!tb[GENLTEST_A_MSG]) {prerr("msg attribute missing from message\n");return NL_SKIP;	}/* Print it! */printf("message received: %s\n"nla_get_string(tb[GENLTEST_A_MSG]));return NL_OK;}/* Send (unicast) GENLTEST_CMD_ECHO request message */staticintsend_echo_msg(struct nl_sock *sk, int fam){int	       err = 0;struct nl_msg *msg = nlmsg_alloc();if (!msg) {return -ENOMEM;	}/* Put the genl header inside message buffer */void *hdr = genlmsg_put(msg, NL_AUTO_PORT, NL_AUTO_SEQ, fam, 00,				GENLTEST_CMD_ECHO, GENLTEST_GENL_VERSION);if (!hdr) {return -EMSGSIZE;	}/* Put the string inside the message. */	err = nla_put_string(msg, GENLTEST_A_MSG,			     "Hello from User Space, Netlink!");if (err < 0) {return -err;	}printf("message sent\n");/* Send the message. */	err = nl_send_auto(sk, msg);	err = err >= 0 ? 0 : err;nlmsg_free(msg);return err;}/* Allocate netlink socket and connect to generic netlink */staticintconn(struct nl_sock **sk){	*sk = nl_socket_alloc();if (!sk) {return -ENOMEM;	}return genl_connect(*sk);}/* Disconnect and release socket */staticvoiddisconn(struct nl_sock *sk){nl_close(sk);nl_socket_free(sk);}/* Modify the callback for replies to handle all received messages */staticinlineintset_cb(struct nl_sock *sk){return nl_socket_modify_cb(sk, NL_CB_VALID, NL_CB_CUSTOM,				   echo_reply_handler, NULL);}intmain(void){int		ret = 1;struct nl_sock *ucsk, *mcsk;/*	 * We use one socket to receive asynchronous "notifications" over	 * multicast group, and another for ops. We do this so that we don't mix	 * up responses from ops with notifications to make handling easier.	 */if ((ret = conn(&ucsk)) || (ret = conn(&mcsk))) {prerr("failed to connect to generic netlink\n");goto out;	}/* Resolve the genl family. One family for both unicast and multicast. */int fam = genl_ctrl_resolve(ucsk, GENLTEST_GENL_NAME);if (fam < 0) {prerr("failed to resolve generic netlink family: %s\n",		      strerror(-fam));goto out;	}/* Disable sequence checks for asynchronous multicast messages. */nl_socket_disable_seq_check(mcsk);/* Resolve the multicast group. */int mcgrp = genl_ctrl_resolve_grp(mcsk, GENLTEST_GENL_NAME,					  GENLTEST_MC_GRP_NAME);if (mcgrp < 0) {prerr("failed to resolve generic netlink multicast group: %s\n",		      strerror(-mcgrp));goto out;	}/* Join the multicast group. */if ((ret = nl_socket_add_membership(mcsk, mcgrp) < 0)) {prerr("failed to join multicast group: %s\n"strerror(-ret));goto out;	}if ((ret = set_cb(ucsk)) || (ret = set_cb(mcsk))) {prerr("failed to set callback: %s\n"strerror(-ret));goto out;	}/* Send unicast message and listen for response. */if ((ret = send_echo_msg(ucsk, fam))) {prerr("failed to send message: %s\n"strerror(-ret));	}printf("listening for messages\n");nl_recvmsgs_default(ucsk);/* Listen for "notifications". */while (1) {nl_recvmsgs_default(mcsk);	}	ret = 0;out:disconn(ucsk);disconn(mcsk);return ret;}
Makefile
all: genltest.cgcc genltest.c $(shell pkg-config --cflags --libs libnl-3.0 libnl-genl-3.0) -o genltest
基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-08-21 21:54:45 HTTP/1.1 GET : https://www.yeyulingfeng.com/a/955926.html
  2. 运行时间 : 0.360309s [ 吞吐率:2.78req/s ] 内存消耗:4,844.51kb 文件加载:145
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=b1eeb8184494b7e6c48fe04aae083ea1
  1. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/public/index.php ( 0.79 KB )
  2. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/autoload.php ( 0.17 KB )
  3. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/composer/platform_check.php ( 0.90 KB )
  5. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/composer/autoload_static.php ( 6.05 KB )
  7. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/ralouphie/getallheaders/src/getallheaders.php ( 1.60 KB )
  10. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  11. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  12. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  13. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  14. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  15. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  16. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  17. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  18. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  19. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  20. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/guzzlehttp/guzzle/src/functions_include.php ( 0.16 KB )
  21. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/guzzlehttp/guzzle/src/functions.php ( 5.54 KB )
  22. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  23. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  24. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  25. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/provider.php ( 0.19 KB )
  26. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  27. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  28. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  29. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/common.php ( 0.03 KB )
  30. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  31. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  32. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/alipay.php ( 3.59 KB )
  33. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  34. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/app.php ( 0.95 KB )
  35. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/cache.php ( 0.78 KB )
  36. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/console.php ( 0.23 KB )
  37. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/cookie.php ( 0.56 KB )
  38. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/database.php ( 2.48 KB )
  39. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/filesystem.php ( 0.61 KB )
  40. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/lang.php ( 0.91 KB )
  41. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/log.php ( 1.35 KB )
  42. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/middleware.php ( 0.19 KB )
  43. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/route.php ( 1.89 KB )
  44. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/session.php ( 0.57 KB )
  45. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/trace.php ( 0.34 KB )
  46. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/config/view.php ( 0.82 KB )
  47. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/event.php ( 0.25 KB )
  48. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  49. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/service.php ( 0.13 KB )
  50. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/AppService.php ( 0.26 KB )
  51. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  52. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  53. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  54. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  55. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  56. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/services.php ( 0.14 KB )
  57. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  58. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  59. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  60. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  61. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  62. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  63. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  64. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  65. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  66. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  67. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  68. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  69. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  70. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  71. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  72. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  73. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  74. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  75. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  76. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  77. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  78. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  79. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  80. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  81. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  82. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  83. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  84. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  85. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  86. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  87. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/Request.php ( 0.09 KB )
  88. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  89. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/middleware.php ( 0.25 KB )
  90. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  91. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  92. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  93. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  94. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  95. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  96. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  97. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  98. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  99. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  100. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  101. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  102. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  103. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/route/app.php ( 4.22 KB )
  104. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  105. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  106. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  107. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/controller/Index.php ( 10.56 KB )
  108. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/BaseController.php ( 2.05 KB )
  109. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  110. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  111. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  112. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  113. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  114. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  115. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  116. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  117. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  118. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  119. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  120. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  121. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  122. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  123. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  124. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  125. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  126. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  127. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  128. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  129. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  130. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  131. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  132. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  133. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  134. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  135. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/app/controller/Es.php ( 3.11 KB )
  136. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  137. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  138. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  139. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  140. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  141. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/runtime/temp/c935550e3e8a3a4c27dd94e439343fdf.php ( 31.50 KB )
  142. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  143. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  144. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  145. /yingpanguazai/ssd/ssd1/www/wwww.yeyulingfeng.com/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.000958s ] mysql:host=127.0.0.1;port=3306;dbname=wenku;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.001650s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000807s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.001154s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.001612s ]
  6. SELECT * FROM `set` [ RunTime:0.000903s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.001747s ]
  8. SELECT * FROM `article` WHERE `id` = 955926 LIMIT 1 [ RunTime:0.012485s ]
  9. UPDATE `article` SET `lasttime` = 1787320485 WHERE `id` = 955926 [ RunTime:0.011829s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 64 LIMIT 1 [ RunTime:0.000988s ]
  11. SELECT * FROM `article` WHERE `id` < 955926 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.001975s ]
  12. SELECT * FROM `article` WHERE `id` > 955926 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.011561s ]
  13. SELECT * FROM `article` WHERE `id` < 955926 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.072289s ]
  14. SELECT * FROM `article` WHERE `id` < 955926 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.010568s ]
  15. SELECT * FROM `article` WHERE `id` < 955926 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.007456s ]
0.363903s