Optical packet networks topic has attracted very interest within the last years. Several efforts have been addressed to deal with all those issues derived from the use of optical packets to carry the information. Header processing is one of the main functionalities required at intermediate nodes, where a packet must be routed to the corresponding destination. All-optical techniques for address recognition and routing are expected to reduce the processing delays compared to electronic processing, therefore decreasing the latency of the communications link. Optical header recognition can be achieved using several different optical data processing methods. The aim of this work is the proposal of new architectures for header processing based on the use of all-optical logical gates. These architectures are implemented based on the semiconductor optical amplifier Mach-Zehnder Interferometer (SOA-MZI) as a key element, using the cross-phase modulation (XPM) nonlinear effect in SOAs to achieve the required functionality. The SOA-MZI structure using XPM turns out as a very promising candidate because of its advantages of low energy requirements, compactness, high extinction ratio (ER), regenerative capability and low chirp. The work presented in this Thesis has been focused on the XOR logic gate implementation, since it is a very versatile approach for implementing many functions in optical networks. Two schemes for all-optical packet header recognition are proposed based on the XOR logic gate. The first proposed scheme is based on cascaded SOA-MZIs, which provides potentiality to build a fully photonic-integrated circuit. The second approach proposed in this Thesis to perform packet header processing solves the scalability issue by adding to the SOA-MZI an external feedback loop. Furthermore, some applications for header processing and routing are presented in this Thesis based on the XOR logic gate optical correlator. A novel architecture for all-optical label reading and packet routing are studied. The implementation of these functionalities using all-optical network sub-systems are demonstrated by functional interconnection of SOA-MZI based integrated devices.