By extending the recently developed filtering theory under the min-plus algebra to the max-plus algebra, we develop a general framework for providing deterministic quality-of-service guarantees in telecommunication networks with variable length packets. The traffic in such networks is modeled by marked point processes that consist of two sequences of variables: the arrival times and the packet lengths. By modifying Cruz's characterization for a counting process, we propose a traffic characterization, called g-regularity, to characterize a marked point process. Based on the traffic characterization, we introduce two basic network elements: traffic regulators that generate g-regular marked point processes; and g-servers that provides quality-of-service for marked point processes. As in the filtering theory under the min-plus algebra, network elements can be joined by concatenation, filter bank summation, and feedback to form a composite network element. We illustrate the use of the framework by various examples that include G/G/1 queues, VirtualClock, guaranteed rate servers in tandem, segmentation and reassembly, jitter control, dampers, and window flow control.