CN104486381A - Router local-information pushing method - Google Patents
Router local-information pushing method Download PDFInfo
- Publication number
- CN104486381A CN104486381A CN201410703371.6A CN201410703371A CN104486381A CN 104486381 A CN104486381 A CN 104486381A CN 201410703371 A CN201410703371 A CN 201410703371A CN 104486381 A CN104486381 A CN 104486381A
- Authority
- CN
- China
- Prior art keywords
- router
- packet
- local information
- pushes
- advertisement
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/55—Push-based network services
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q30/00—Commerce
- G06Q30/02—Marketing; Price estimation or determination; Fundraising
- G06Q30/0241—Advertisements
- G06Q30/0251—Targeted advertisements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/02—Topology update or discovery
Landscapes
- Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Accounting & Taxation (AREA)
- Development Economics (AREA)
- Strategic Management (AREA)
- Finance (AREA)
- Game Theory and Decision Science (AREA)
- Entrepreneurship & Innovation (AREA)
- Economics (AREA)
- Marketing (AREA)
- Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a router local-information pushing method, which comprises the following steps of after a specific data packet is received, updating routing information by a router, then reconstructing the data packet, exchanging the source and destination IP (Internet Protocol) address of the original data packet, filling local information, such as advertising information into a data segment, and pushing an advertisement to a terminal. In the technical scheme of the invention, routing products can be more intellectualized under the same condition, and a user basically does not need to configure software, so that the method is simple and convenient to operate. Meanwhile, the cost of a server can be saved, and only one ordinary U disk or SD (Secure Digital) card is needed. The key is that each business owner can simply arrange an own local-advertisement pushing system.
Description
Technical field
The present invention relates to the method field that a kind of router pushes local information, particularly a kind of router that utilizes pushes the method for local commercial advertisement to terminal use.
Background technology
Set up a kind of captive portals/focus management system and have multiple method, but know-why is all similar, general need a fire compartment wall, gateway system and one for the background system of authentication management and control.Common technical solution has Nocat, Wifidog, Chillispot etc.This kind of system and arranging has various system requirements and construction method all respectively.First user accesses wifi network can jump to certificate server, the advertisement webpage then can force users access services device specified.Because constituent components and subsystem are many, so relatively all more loaded down with trivial details.Need certificate server (or Advertisement Server) simultaneously, increase hardware costs, software merit rating is complicated, complex operation.The advertiser that this scheme conveniently can not meet business wifi pushes local advertising.
Problems existing in concrete existing implementation method:
1, this kind of system and arranging has various system requirements and construction method all respectively, e.g., and wifidog plug-in unit, Verification System (or ad system).This is unfavorable for the advertisement push system that independent single business storekeeper layout is controlled oneself very much.
2, need certificate server (or Advertisement Server), increase hardware costs, software merit rating is complicated, complex operation.
3, inconvenient advertiser changes advertisement, needs to log in consistency operation, is not easy to operation for general personnel.
Current scheme system is constructed various system requirements and construction method all respectively.First user accesses wifi network can jump to certificate server, the advertisement webpage then can force users access services device specified.Because constituent components and subsystem are many, so relatively all more loaded down with trivial details.Need certificate server (or Advertisement Server) simultaneously, increase hardware costs, software merit rating is complicated, complex operation.The advertiser that original scheme conveniently can not meet business wifi pushes local advertising.
Summary of the invention
The object of the invention is to propose a kind of method that router pushes local information, utilize method of the present invention, just can by advertisement pushing to client in router side.
Technical scheme of the present invention is a kind of method that router pushes local information, comprises the following steps:
The TCP request get request data package whether step S1, detection have client terminal to send, if had, goes to step S2, if do not detected, continues to detect;
The routing iinformation of step S2, more new router, the source IP of the TCP request get request data package of being sent by the client terminal received, as route object IP, the object IP considering packet simultaneously, obtains the route going to this source IP;
Step S3, reconstruct data bag, data segment adds local information in the packet;
Step S4, packet is become to be sent by ip_output function neotectonics.
Step S5, old packet is modified as RST packet.
In the present invention, can add router local information, like this, advertising message can be packed when reconstruct data bag, by have exchanged source, the reconstruct data bag of destination address issues terminal, completes advertisement pushing.
Optimal way of the present invention comprises:
In described step 3: reconstruct data bag step comprises: more new routing information, exchange source ip and object ip, exchange former port and destination interface, the data length of calculated data bag, from each flag bit of new setting data bag, fill new local data, adjustment tcp effect and, the effect of adjustment ip and.
In this step, more new routing information is to allow the data of neotectonics turn back to client terminal.An address being routing table and storing, one is the address of packet.The trend of packet determines according to routing table rule.
In technical scheme of the present invention, routing product can be made at identical conditions more intelligent, substantially do not need user's configuration software, simple to operate simple and direct.Server cost can be saved simultaneously, only need the USB flash disk (or SD card) that common.Crux is that every business master can the local advertising supplying system (router of a band u dish interface, a USB flash disk) of simple-arranged oneself.
Below in conjunction with specific embodiment, the present invention is described in more detail.
Accompanying drawing explanation
Fig. 1 is the embodiment of the present invention 1 flow chart.
Embodiment
Embodiment 1, as shown in Figure 1, the feature of the present embodiment only needs advertisement webpage to be put in USB flash disk (or SD card), and USB flash disk is linked into router, just can realize the client of advertisement pushing to access wifi network.This scheme is highly suitable for carrying the commercial location encircleing free wifi and uses.
In concrete the present embodiment:
Realizing loading in kernel netfilter framework forces advertisement module to force advertisement module with unloading.
Key structural blocks
/ * terminal interrecord structure body */
static struct list_head pm_dev_list;
typedef struct {
Struct list_head list; / * list of devices */
Int devtype; / * device type */
Char mac [ETH_ALEN]; / * device mac address */
#ifdef TIMEOUT_ENABLE
Uint time; / * timer, record access time */
#endif
Int iFirstChk; / * flag */
Int adson; / * terminal advertisement whether open */
}ST_PM_DEVINFO。
One of the step that packet transmits in netfilter framework is poly-.Mainly be revised as during http access: " advertisement module code can be performed in protocol stack ", packet enters advertisement module and carries out respective handling.As:
Hook carry is at the point of hook=NF_IP_PRE_ROUTING, and when using NF_IP_PRE_ROUTING hook point, access http can trigger the ditch subfunction ip_pm_in forcing advertisement module.
First, whether entirely enablely judge to force advertising function, open and then check that whether packet is effective, check whether as Tcp packet, obtain Tcp head, only force 80 port HTTP to access, whether the destination address of packet is the address of router LAN side client, and the data message method of http request is Get.
Then force bag route processing, by the object IP of the source IP of current data packet as route, consider the object IP of packet simultaneously, obtain the route going to this source IP.Check whether packet is rst bag, check whether packet is fragment packets, if be not, then by calling skb_copy_expand function, the former skb packet basis of send_redirect function builds a new data packets nskb, discharge the current route Cache of nskb simultaneously, more new routing information, exchange source ip and object ip, exchange former port and object port, the data length of calculated data bag, from each flag bit of new setting data bag, fill new data (referring to the new data of advertisement webpage), adjustment tcp effect and, adjustment ip effect and etc., packet is become to be sent by ip_output function neotectonics.
By send_reset original tcp data guaranteed the repair free of charge and change RST bag into.
RST bag is a type of packet, is mainly used for disconnecting current TCP and connects.If be fragment packets, do not process.
After user's first time access advertisement webpage, advertisement switch corresponding for user is set to 0, represents that accesses network does not need pop-up advertisement webpage again in next time-out time.
Have a time field above this in data structure, be exactly the time in order to record access, the difference of the time of present system time and access judges whether time-out.It is that a global variable is preserved that time-out time is arranged.
Force advertisement module to realize timer processing function, arranging time-out time is 1 hour (time-out time can be fixed according to actual conditions), if certain client online time-out, deletes corresponding MAC record in MAC managing listings.Can control user like this when accessing wifi network, time-out all needs to visit again an advertisement webpage.
At hook hook=NF_IP_PRE_ROUTING carry hook process function, before being redirected to local advertisement webpage.First the mac of client is inserted pm_dev_list management, the advertisement switch of acquiescence mac is opened, and during user's first time accesses network, needs access advertisement webpage.
Force advertising function switch, when kernel scouts USB flash disk access, USB flash disk mount to file system assigned address, as :/mnt/usb/, default advertisement webpage name is called ads.html, and like this, advertising network path is /mnt/usb/ads.html.When kernel scouts USB flash disk access, kernel usb module connects the encapsulation function by advertisement module, judge whether existence/mnt/usb/ads.html advertisement webpage, if there is advertisement internal mold module can automatically open pressure turn function, the advertisement switch of the user in all mac managing listings is all set to 1, http must be redirected to advertisement webpage when showing that user visits net network, thus reality shows advertisement on end user.If there is not advertisement webpage, then close and force turn function, the advertisement switch of the user in all mac managing listings is all set to 0, and such user normally can access network, without the need to accessing advertisement webpage.
Claims (6)
1. router pushes a method for local information, comprises the following steps:
The TCP request get request data package whether step S1, router detection have the client terminal of connection route device to send, if had, goes to step S2, if do not detected, continues to detect;
The routing iinformation of step S2, more new router, the source IP of the TCP request get request data package of being sent by the client terminal received, as route object IP, the object IP considering packet simultaneously, obtains the route going to this source IP;
Step S3, reconstruct data bag, data segment adds local information in the packet;
Step S4, packet is become to be sent by ip_output function neotectonics;
Step S5, old packet is modified as RST packet.
2. router according to claim 1 pushes the method for local information, it is characterized in that: in described step 3: reconstruct data bag step comprises: more new routing information, exchange source ip and object ip, exchange former port and destination interface, the data length of calculated data bag, from each flag bit of new setting data bag, fills new local data, adjustment tcp effect and, the effect of adjustment ip and.
3. router according to claim 1 pushes the method for local information, and it is characterized in that: in described step S3, the local information added is advertisement module.
4. router according to claim 3 pushes the method for local information, it is characterized in that: realize in advance loading in router kernel netfilter framework and force advertisement module to force advertisement module with unloading.
5. router according to claim 4 pushes the method for local information, it is characterized in that: when loading pressure advertisement module, confirms that client user is using browser to surf the Net, if client is not using browser to surf the Net, does not then process.
6. router according to claim 5 pushes the method for local information, it is characterized in that: confirm that client user is using browser to surf the Net and comprising the following steps:
Whether entirely enablely judge to force advertising function, open and then check that whether packet is effective, check whether as Tcp packet, obtain Tcp head, 80 port HTTP are only forced to access, whether the destination address of packet is the address of router LAN side client, and the data message method of http request is Get.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410703371.6A CN104486381A (en) | 2015-01-23 | 2015-01-23 | Router local-information pushing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410703371.6A CN104486381A (en) | 2015-01-23 | 2015-01-23 | Router local-information pushing method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN104486381A true CN104486381A (en) | 2015-04-01 |
Family
ID=52760885
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410703371.6A Pending CN104486381A (en) | 2015-01-23 | 2015-01-23 | Router local-information pushing method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104486381A (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101060417A (en) * | 2006-04-21 | 2007-10-24 | 飞塔信息科技(北京)有限公司 | Network advertisement broadcasting system |
CN101296256A (en) * | 2008-06-19 | 2008-10-29 | 中国电信股份有限公司 | Method and system for implementing accurate information propelling by internet |
CN102710658A (en) * | 2012-06-20 | 2012-10-03 | 深圳市宏电技术股份有限公司 | Information push method and system |
US20130091006A1 (en) * | 2011-10-07 | 2013-04-11 | Neomtech Co., Ltd. | Communication System For Controlling Network Access Through Access Point By Using Advertisement |
CN103457950A (en) * | 2013-08-30 | 2013-12-18 | 厦门锋联信息技术有限公司 | Wireless router and method for delivering advertisements with same |
CN103812936A (en) * | 2014-01-28 | 2014-05-21 | 张孝明 | Method and device for pushing advertisements through router |
CN103905990A (en) * | 2012-12-27 | 2014-07-02 | 浩通科技(深圳)有限公司 | Method of wirelessly publishing shopping mall advertisement and building shopping mall mini cloud |
CN203984452U (en) * | 2014-07-29 | 2014-12-03 | 曹荣娇 | A kind of personalized advertisement pushes micro-letter certification router |
-
2015
- 2015-01-23 CN CN201410703371.6A patent/CN104486381A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101060417A (en) * | 2006-04-21 | 2007-10-24 | 飞塔信息科技(北京)有限公司 | Network advertisement broadcasting system |
CN101296256A (en) * | 2008-06-19 | 2008-10-29 | 中国电信股份有限公司 | Method and system for implementing accurate information propelling by internet |
US20130091006A1 (en) * | 2011-10-07 | 2013-04-11 | Neomtech Co., Ltd. | Communication System For Controlling Network Access Through Access Point By Using Advertisement |
CN102710658A (en) * | 2012-06-20 | 2012-10-03 | 深圳市宏电技术股份有限公司 | Information push method and system |
CN103905990A (en) * | 2012-12-27 | 2014-07-02 | 浩通科技(深圳)有限公司 | Method of wirelessly publishing shopping mall advertisement and building shopping mall mini cloud |
CN103457950A (en) * | 2013-08-30 | 2013-12-18 | 厦门锋联信息技术有限公司 | Wireless router and method for delivering advertisements with same |
CN103812936A (en) * | 2014-01-28 | 2014-05-21 | 张孝明 | Method and device for pushing advertisements through router |
CN203984452U (en) * | 2014-07-29 | 2014-12-03 | 曹荣娇 | A kind of personalized advertisement pushes micro-letter certification router |
Non-Patent Citations (1)
Title |
---|
刘亦君: ""基于无线路由器的广告发布系统的设计与实现"", 《科技广场》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101039309B (en) | Link sharing service apparatus and communication method thereof | |
JP2018045671A (en) | Method and apparatus for scheduling cloud server | |
CN105812435B (en) | Application upgrading data packet processing method and device, electronic equipment and system | |
CN103534984A (en) | Port setting method, apparatus and computer program product for routing | |
WO2018121334A1 (en) | Web application service providing method, apparatus, electronic device and system | |
WO2014101475A1 (en) | Cloud platform application deployment method and apparatus | |
WO2019128273A1 (en) | Method, device and system for determining connection relation of network devices | |
CN109617906B (en) | Access method and device of hybrid cloud | |
US12052173B2 (en) | Executing workloads across multiple cloud service providers | |
CN104579887A (en) | Cloud gateway as well as cloud gateway creation and configuration system and method | |
CN112235136A (en) | Network file system backup method, system, terminal and storage medium | |
CN104539665A (en) | Remote file control system based on routers | |
US10225358B2 (en) | Page push method, device, server and system | |
CN107249038A (en) | Business datum retransmission method and system | |
CN115022408A (en) | Data transmission method and device based on service grid and electronic equipment | |
CN104883277A (en) | Method and system for information interaction based on BMC | |
US11405766B2 (en) | Connecting computer processing systems and transmitting data | |
EP3857826B1 (en) | Flexible unnumbered destination tunnels for virtual networks | |
CN104463619A (en) | LDAP-based internet product catalogue selling system and control method | |
US11973824B2 (en) | Method for data transmission of audio and video in end-to-end system | |
CN104348646A (en) | Configuration data processing method, device and system | |
CN106462421B (en) | Telecommunication device and method for updating software in a telecommunication device | |
JP6003726B2 (en) | Packet processing apparatus, packet processing program, and network system | |
CN104486381A (en) | Router local-information pushing method | |
CN115665026A (en) | Cluster networking method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20150401 |
|
RJ01 | Rejection of invention patent application after publication |