如何使用 lpd/lpr 获取有关打印机的信息?
我想使用端口 515(lpd 协议)来查询打印机的身份,但是,与其他一些协议不同,lpd 在发出打印请求时似乎不会返回有关打印机的任何信息。 (根据 Wireshark 捕获的数据包来判断。)我查看了 Unix 的 lpinfo、lpadmin、lpstat 等,以及 RFC 1179(LPD 协议),但似乎找不到任何可以对 515 以上的打印机进行指纹识别的命令(例如“HP2250 LaserJet”)。有人知道该怎么做吗?
I'd like to use port 515 (lpd protocol) to query a printer about its identity, but, unlike some other protocols, lpd does not seem to return any information about the printer when a print request is made. (Judging by the packets captured with Wireshark.) I've looked through Unix's lpinfo, lpadmin, lpstat, etc., as well as RFC 1179 (LPD Protocol) but can't seem to find any commands that will fingerprint the printer over 515 (e.g. "HP2250 LaserJet"). Anyone know how to do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
LPD
对具有 PostScript 根源的打印机做出了巨大的假设。它可以管理任何打印机(包括 ASCII)的原始打印文件,但假设页面定义语言(例如 PostScript)将由打印机本身使用和呈现。尽管队列状态信息通常可用,但其余信息则不可用。这也符合 LPD 的历史,因为它不一定是打印机级守护进程,而是服务器守护进程,然后将其排队/代理到其他
>本地连接的 LPD 或(行)打印机不会对作业进行排队。
您是否想通过 LPD 实现超出预期的目标?
LPD
makes a huge assumption about the printer with its PostScript roots. It can manage raw print files to any printer (ASCII inclusive), but makes the assumption the the page definition language (e.g. PostScript) will be consumed and rendered by the printer itself. Though queue status information is often available, the rest is not.This also goes with the history of
LPD
in that it was not necessarily a printer-level deamon but a server deamon which would then queue/proxy this off to either otherLPD
s or (line) printers attached locally that would not queue jobs.Is there something you're trying to accomplish via LPD above and beyond what it is intended?